uiacceltk/hitchcock/coretoolkit/rendervg10/inc/HuiFxVg10OffscreenRenderbuffer.h
changeset 0 15bf7259bb7c
child 17 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 HUIFXVG10OFFSCREENRENDERBUFFER_H_
       
    21 #define HUIFXVG10OFFSCREENRENDERBUFFER_H_
       
    22 
       
    23 #include "HuiFxVg10RenderbufferBase.h"
       
    24 #include "HuiVg10RenderPlugin.h"
       
    25 
       
    26 //FORWARD DECLARATIONS
       
    27 class CHuiVg10RenderPlugin;
       
    28 
       
    29 class CHuiFxVg10OffscreenRenderbuffer: public CHuiFxVg10RenderbufferBase
       
    30     {
       
    31 public:
       
    32     static CHuiFxVg10OffscreenRenderbuffer* NewL(CHuiVg10RenderPlugin& aPlugin, const TSize& aSize);
       
    33     ~CHuiFxVg10OffscreenRenderbuffer();
       
    34 
       
    35     void InitGc(const TSize& aSize);
       
    36     CHuiGc& BindAsRenderTarget();
       
    37     void BindAsTexture(THuiFxRenderbufferUsage aUsage);
       
    38     void UnbindAsRenderTarget();
       
    39     void UnbindAsTexture();
       
    40 
       
    41     void PrepareForReuse(const TSize& aReusedSize);
       
    42     
       
    43     VGImage Image() const;
       
    44 protected:
       
    45     void ConstructL(CHuiVg10RenderPlugin& aPlugin, const TSize& aSize);
       
    46 private:
       
    47     void ReadBackground();
       
    48     void PushEGLContext();
       
    49     void PopEGLContext();
       
    50     
       
    51 private:
       
    52     CHuiVg10RenderPlugin*   iPlugin;
       
    53     CHuiGc*                 iGc;
       
    54     VGImage                 iImage;
       
    55     EGLContext              iContext;
       
    56     EGLSurface              iSurface;
       
    57     EGLContext              iSavedContext;
       
    58     EGLSurface              iSavedReadSurface;
       
    59     EGLSurface              iSavedDrawSurface;
       
    60     VGImage                 iRotatedImage;    
       
    61     TEGLState               iPreviousEGLState;
       
    62     };
       
    63 
       
    64 #endif /*HUIFXVG10OFFSCREENRENDERBUFFER_H_*/