uiacceltk/hitchcock/coretoolkit/rendervg10/inc/HuiFxVg10OnscreenRenderbuffer.h
changeset 0 15bf7259bb7c
child 9 3ac8bf5c5014
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef HUIFXVG10ONSCREENRENDERBUFFER_H_
       
    21 #define HUIFXVG10ONSCREENRENDERBUFFER_H_
       
    22 
       
    23 #include "HuiFxVg10RenderbufferBase.h"
       
    24 
       
    25 //FORWARD DECLARATIONS
       
    26 class CHuiVg10RenderPlugin;
       
    27 class CHuiVg10RenderSurface;
       
    28 class CHuiVg10PBufferSurface;
       
    29 
       
    30 /**
       
    31  *  A renderbuffer that uses an EGL surface for storage.
       
    32  */
       
    33 
       
    34 class CHuiFxVg10OnscreenRenderbuffer: public CHuiFxVg10RenderbufferBase
       
    35     {
       
    36 public:
       
    37     static CHuiFxVg10OnscreenRenderbuffer* NewL(CHuiVg10RenderPlugin& aPlugin, CHuiVg10RenderSurface& aSurface);
       
    38     ~CHuiFxVg10OnscreenRenderbuffer();
       
    39 
       
    40     CHuiGc& BindAsRenderTarget();
       
    41     void BindAsTexture(THuiFxRenderbufferUsage aUsage);
       
    42     void UnbindAsRenderTarget();
       
    43     void UnbindAsTexture();
       
    44 
       
    45     VGImage Image() const;
       
    46 protected:
       
    47     void ConstructL(CHuiVg10RenderPlugin& aPlugin, CHuiVg10RenderSurface& aSurface);
       
    48     void PrepareForReuse(const TSize& /* aReusedRect */);
       
    49 private:
       
    50     CHuiVg10RenderPlugin*   iPlugin;
       
    51     CHuiVg10RenderSurface*  iSurface;
       
    52     CHuiGc*                 iGc;
       
    53     VGImage                 iImage;
       
    54     EGLContext              iSavedContext;
       
    55     EGLSurface              iSavedReadSurface;
       
    56     EGLSurface              iSavedDrawSurface;
       
    57     THuiFxRenderbufferUsage iTextureUsage;
       
    58     };
       
    59 
       
    60 #endif /*HUIFXVG10ONSCREENRENDERBUFFER_H_*/