46
|
1 |
/*
|
|
2 |
* Copyright (c) 2003 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: CHWVGSurfaceImpl header file
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef HWVGSURFACEIMPL_H_
|
|
19 |
#define HWVGSURFACEIMPL_H_
|
|
20 |
|
|
21 |
#include <e32base.h>
|
|
22 |
|
|
23 |
#include "MVGSurfaceImpl.h"
|
|
24 |
|
|
25 |
#ifdef HWRENDERER
|
|
26 |
#include <EGL\egl.h>
|
|
27 |
#endif
|
|
28 |
|
|
29 |
class CHWVGSurfaceImpl : public CBase, public MVGSurfaceImpl
|
|
30 |
{
|
|
31 |
public:
|
|
32 |
enum HWSurfaceType
|
|
33 |
{
|
|
34 |
SURFACE_PBUFFER = 0,
|
|
35 |
SURFACE_WINDOW = 1,
|
|
36 |
SURFACE_PIXMAP = 2
|
|
37 |
};
|
|
38 |
public:
|
|
39 |
static CHWVGSurfaceImpl* NewL(TUint8 aOption);
|
|
40 |
static CHWVGSurfaceImpl* NewLC(TUint8 aOption);
|
|
41 |
|
|
42 |
virtual ~CHWVGSurfaceImpl();
|
|
43 |
|
|
44 |
virtual TInt InitializeSurface(TSize aSize, TInt aColorSpace);
|
|
45 |
|
|
46 |
virtual TInt CreateSurface(TInt aDisplayMode, RWindow *aSurface, CFbsBitmap *aBitmap);
|
|
47 |
|
|
48 |
virtual TInt ResizeSurface(TSize aSize);
|
|
49 |
|
|
50 |
virtual TInt CopyBitmap(TInt aDisplayMode,TInt aMaskMode, CFbsBitmap *aBitmap, CFbsBitmap *aMask, TSize aSize = TSize(0,0));
|
|
51 |
|
|
52 |
virtual TInt PrepareToBindClientBuffer();
|
|
53 |
virtual TInt BindClientBuffer(TInt buffer);
|
|
54 |
|
|
55 |
virtual TInt UnBindClientBuffer();
|
|
56 |
|
|
57 |
virtual void TerminateSurface();
|
|
58 |
|
|
59 |
virtual void SetConfiguration(TInt aOption, const TAny* aValue);
|
|
60 |
|
|
61 |
|
|
62 |
private:
|
|
63 |
CHWVGSurfaceImpl(TUint8 aOption);
|
|
64 |
void ConstructL();
|
|
65 |
TInt CreatePBufferSurface();
|
|
66 |
TInt MapEGLErrorCodeToSymbian(TInt aErrorCode);
|
|
67 |
|
|
68 |
TUint8 iSurfaceType;
|
|
69 |
TSize iSize;
|
|
70 |
#ifdef HWRENDERER
|
|
71 |
EGLDisplay iEglDisplay;
|
|
72 |
EGLSurface iEglSurface;
|
|
73 |
EGLSurface iEglPBufferSurface_Client;
|
|
74 |
EGLContext iEglContext;
|
|
75 |
EGLConfig iConfig;
|
|
76 |
#endif
|
|
77 |
};
|
|
78 |
|
|
79 |
#endif /*HWVGSURFACEIMPL_H_*/
|