uiacceltk/hitchcock/coretoolkit/rendervg10/inc/HuiVg10VgImageBinder.h
changeset 0 15bf7259bb7c
child 17 3ac8bf5c5014
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:   Definition of CHuiVg10VGImageBinder
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef HUIVG10VGIMAGEBINDER_H_
       
    19 #define HUIVG10VGIMAGEBINDER_H_
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <e32def.h>
       
    23 #include <VG/openvg.h>
       
    24 #include <EGL/egl.h>
       
    25 #include <MVGImageBinder.h>
       
    26 
       
    27 // Forward declarations
       
    28 class CHuiVg10RenderPlugin;
       
    29 
       
    30 /**
       
    31  * Implementation class for MVGImageBinder API.
       
    32  * 
       
    33  * This class is being used for providing the NVGDecoder the necessary
       
    34  * implementation for handling NVG-TLV special case "Group opacity"
       
    35  */
       
    36 class CHuiVg10VgImageBinder : public CBase, public MVGImageBinder
       
    37     {
       
    38 public:
       
    39 
       
    40     /**
       
    41      * Constructor.
       
    42      */
       
    43     static CHuiVg10VgImageBinder* NewL(CHuiVg10RenderPlugin* aRenderPlugin);
       
    44 
       
    45     /**
       
    46      * Destructor.
       
    47      */
       
    48     virtual ~CHuiVg10VgImageBinder();
       
    49 
       
    50     /**
       
    51      * From MVGImageBinder, creates a new PBufferFromClientBuffer
       
    52      * surface from the given parameter (of type VGImage)
       
    53      * 
       
    54      * @param   aBuffer A Buffer identifier (VGImage handle), used to create the surface
       
    55      * @return  Error code
       
    56      */
       
    57     TInt BindClientBuffer(TUint aBuffer);
       
    58 
       
    59     /**
       
    60      * From MVGImageBinder, unbinds the PBufFromCliBuf & restores the previous surface
       
    61      * 
       
    62      * @return  Error code
       
    63      */
       
    64     TInt UnBindClientBuffer();
       
    65 
       
    66     
       
    67 private:    // Methods
       
    68     
       
    69     /**
       
    70     * Constructor.
       
    71     */
       
    72    CHuiVg10VgImageBinder(CHuiVg10RenderPlugin* aRenderPlugin);
       
    73 
       
    74    /**
       
    75     * 2nd phase constructor
       
    76     */
       
    77    void ConstructL();
       
    78     
       
    79    
       
    80 private:    // Data
       
    81 
       
    82     /** NOT Owned! **/
       
    83     CHuiVg10RenderPlugin* iRenderPlugin;
       
    84     
       
    85     EGLSurface iEglPBufferSurface_Client;
       
    86     EGLSurface iSavedDrawSurface;
       
    87     EGLSurface iSavedReadSurface;
       
    88 
       
    89     EGLContext iContext;
       
    90     EGLContext iSavedContext;
       
    91     };
       
    92 
       
    93 #endif /* HUIVG10VGIMAGEBINDER_H_ */
       
    94