|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @test |
|
19 @internalComponent - Internal Symbian test code |
|
20 */ |
|
21 |
|
22 #ifndef __TDIRECTGDITESTBASE_H__ |
|
23 #define __TDIRECTGDITESTBASE_H__ |
|
24 |
|
25 #include "te_graphicsperformanceSuiteStepBase.h" |
|
26 |
|
27 #include <pixelformats.h> |
|
28 #include <graphics/directgdicontext.h> |
|
29 #include <graphics/directgdiimagetarget.h> |
|
30 #ifndef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE |
|
31 #include <graphics/sgimage.h> |
|
32 #endif |
|
33 _LIT(KFontTypeface, "DejaVu Sans Condensed"); |
|
34 const TInt KFontSize = 14; |
|
35 |
|
36 /**************************************************************************** |
|
37 * The reason to have a new step base is that it is very much possible |
|
38 * that the all individual test steps have project related common variables |
|
39 * and members |
|
40 * and this is the place to define these common variable and members. |
|
41 * |
|
42 ****************************************************************************/ |
|
43 class CTDirectGdiTestBase : public CTe_graphicsperformanceSuiteStepBase |
|
44 { |
|
45 public: |
|
46 CTDirectGdiTestBase(); |
|
47 virtual ~CTDirectGdiTestBase(); |
|
48 |
|
49 virtual CFbsBitmap* GetTargetAsBitmapL(); |
|
50 |
|
51 protected: |
|
52 // From CTe_graphicsperformanceSuiteStepBase |
|
53 virtual enum TVerdict doTestStepL() { return ETestSuiteError; } |
|
54 #ifndef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE |
|
55 virtual TVerdict doTestStepPreambleL(); |
|
56 virtual TVerdict doTestStepPostambleL(); |
|
57 #endif |
|
58 TInt SetTargetPixelFormatL(TDisplayMode aDisplayMode); |
|
59 |
|
60 |
|
61 private: |
|
62 void InitializeDirectGdiL(); |
|
63 void UninitializeDirectGdi(); |
|
64 |
|
65 protected: |
|
66 CDirectGdiContext* iContext; |
|
67 CDirectGdiDriver* iDGdiDriver; |
|
68 #ifndef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE |
|
69 RSgImage iSgImageTarget; |
|
70 TSgImageInfo iImageInfo; // image info for RSgImage |
|
71 #endif |
|
72 RDirectGdiImageTarget* iDGdiImageTarget; |
|
73 CDirectGdiFont* iFont; |
|
74 CDirectGdiFont* iLargeFont; |
|
75 CFbsTypefaceStore* iTs; |
|
76 |
|
77 RArray<TUidPixelFormat> iTargetPixelFormatArray; // target pixel format(s) for testing |
|
78 RArray<TUidPixelFormat> iSourcePixelFormatArray; // source pixel format(s) for testing |
|
79 }; |
|
80 |
|
81 #endif |