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