|
1 /* |
|
2 * Copyright (c) 2006-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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __HUIVG10TEXTUREMANAGER_H__ |
|
21 #define __HUIVG10TEXTUREMANAGER_H__ |
|
22 |
|
23 |
|
24 #include "uiacceltk/HuiTextureManager.h" |
|
25 |
|
26 enum TBitmapCopyMode |
|
27 { |
|
28 /** Bitmap handle can be duplicated, no data copying takes place */ |
|
29 EAllowDuplication, |
|
30 /** Always create a new bitmap copy */ |
|
31 EAlwaysCopy, |
|
32 }; |
|
33 |
|
34 |
|
35 /** |
|
36 * Texture manager specialized for OpenGL ES. |
|
37 */ |
|
38 NONSHARABLE_CLASS(CHuiVg10TextureManager) : public CHuiTextureManager |
|
39 { |
|
40 public: |
|
41 |
|
42 /* Constructors and destructor. */ |
|
43 |
|
44 /** |
|
45 * Constructs a new texture manager instance. |
|
46 */ |
|
47 static CHuiVg10TextureManager* NewL(CHuiEnv& aEnv); |
|
48 |
|
49 /** |
|
50 * Constructs a new texture manager instance and leaves it on |
|
51 * the cleanup stack. |
|
52 */ |
|
53 static CHuiVg10TextureManager* NewLC(CHuiEnv& aEnv); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~CHuiVg10TextureManager(); |
|
59 |
|
60 /** |
|
61 * Bitmap color mode conversion. |
|
62 * |
|
63 * @param aBitmap Source bitmap to convert. |
|
64 * @param aDisplayMode Target display mode. |
|
65 * @param aCopyMode Desired copy behavior. |
|
66 * @return a reference to a bitmap with the desired display mode. DOES NOT transfer the ownership! |
|
67 */ |
|
68 CFbsBitmap& ConvertBitmapL(const CFbsBitmap& aBitmap, TDisplayMode aDisplayMode, TBitmapCopyMode aCopyMode = EAllowDuplication, TSize aNewSize = TSize(0,0)); |
|
69 |
|
70 protected: |
|
71 |
|
72 /* Constructors. */ |
|
73 |
|
74 /** |
|
75 * Constructor. |
|
76 */ |
|
77 CHuiVg10TextureManager(CHuiEnv& aEnv); |
|
78 |
|
79 /** |
|
80 * Second-phase constructor. |
|
81 */ |
|
82 void ConstructL(); |
|
83 |
|
84 private: |
|
85 |
|
86 // Member variables needed for bitmap color mode conversion |
|
87 CFbsBitmap* iBitmap16MA; |
|
88 CFbsBitmap* iBitmap16MU; |
|
89 CFbsBitmap* iBitmap64K; |
|
90 CFbsBitmap* iBitmap256Gray; |
|
91 |
|
92 CFbsBitmapDevice* iBitmapDevice16MA; |
|
93 CFbsBitmapDevice* iBitmapDevice16MU; |
|
94 CFbsBitmapDevice* iBitmapDevice64K; |
|
95 CFbsBitmapDevice* iBitmapDevice256Gray; |
|
96 |
|
97 CFbsBitGc* iBitGc16MA; |
|
98 CFbsBitGc* iBitGc16MU; |
|
99 CFbsBitGc* iBitGc64K; |
|
100 CFbsBitGc* iBitGc256Gray; |
|
101 }; |
|
102 |
|
103 #endif // __HUIVG10TEXTUREMANAGER_H__ |