|
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 HUIFXRENDERBUFFER_H_ |
|
21 #define HUIFXRENDERBUFFER_H_ |
|
22 |
|
23 #include "HuiFxConstants.h" |
|
24 #include <uiacceltk/HuiGc.h> |
|
25 |
|
26 class CHuiFxRenderbuffer: public CBase |
|
27 { |
|
28 protected: |
|
29 IMPORT_C CHuiFxRenderbuffer(); |
|
30 // TODO: luminance-only render buffers |
|
31 // TODO: optional alpha channel? |
|
32 IMPORT_C void ConstructL(const TSize& aSize, TRenderBufferType aBufferType); |
|
33 public: |
|
34 IMPORT_C virtual ~CHuiFxRenderbuffer(); |
|
35 |
|
36 virtual CHuiGc& BindAsRenderTarget() = 0; |
|
37 virtual void BindAsTexture(THuiFxRenderbufferUsage aUsage) = 0; |
|
38 virtual void UnbindAsRenderTarget() = 0; |
|
39 virtual void UnbindAsTexture() = 0; |
|
40 |
|
41 virtual void PrepareForReuse(const TSize& aReusedSize) = 0; |
|
42 |
|
43 IMPORT_C const TSize& Size() const; |
|
44 IMPORT_C const TRenderBufferType& BufferType() const; |
|
45 |
|
46 // Position relative to screen coordinates |
|
47 IMPORT_C void SetPosition(TPoint aPosition); |
|
48 IMPORT_C const TPoint& Position() const; |
|
49 |
|
50 // Background is read (or not) from current surface when PrepareForReuse is called. |
|
51 IMPORT_C void EnableBackground(TBool aEnable); |
|
52 |
|
53 protected: |
|
54 TSize iSize; |
|
55 TRenderBufferType iType; |
|
56 TPoint iPosition; |
|
57 TBool iBackgroundEnabled; |
|
58 }; |
|
59 |
|
60 #endif /*HUIFXRENDERBUFFER_H_*/ |