sl@0
|
1 |
// Copyright (c) 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 |
*/
|
sl@0
|
20 |
|
sl@0
|
21 |
#ifndef __EGLTEST_STRESS_SGIMAGE_H__
|
sl@0
|
22 |
#define __EGLTEST_STRESS_SGIMAGE_H__
|
sl@0
|
23 |
|
sl@0
|
24 |
#include <VG/openvg.h>
|
sl@0
|
25 |
#include <test/egltestcommonstep.h>
|
sl@0
|
26 |
#include "egltest_stress_common_sgimage.h"
|
sl@0
|
27 |
|
sl@0
|
28 |
//Test step names
|
sl@0
|
29 |
_LIT(KStressPixmapSurface, "StressPixmapSurface");
|
sl@0
|
30 |
_LIT(KStressVGImage, "StressVGImage");
|
sl@0
|
31 |
_LIT(KStressReadOnly, "StressReadOnly");
|
sl@0
|
32 |
_LIT(KEStressReadWriteSingleImage, "StressReadWriteSingleImage");
|
sl@0
|
33 |
_LIT(KStressReadWriteMultiImage, "StressReadWriteMultiImage");
|
sl@0
|
34 |
|
sl@0
|
35 |
//ini file parameters
|
sl@0
|
36 |
_LIT(KPixelFormat, "PixelFormat");
|
sl@0
|
37 |
_LIT(KNumberRSgImages, "NumberRSgImages");
|
sl@0
|
38 |
_LIT(KNumberChildProcesses, "NumberChildProcesses");
|
sl@0
|
39 |
_LIT(KNumberMainImages, "NumberMainImages");
|
sl@0
|
40 |
_LIT(KRSgImageWidth, "RSgImageWidth");
|
sl@0
|
41 |
_LIT(KRSgImageHeight, "RSgImageHeight");
|
sl@0
|
42 |
|
sl@0
|
43 |
//default section for sim load app ini file
|
sl@0
|
44 |
_LIT(KDefaultSectionName,"default");
|
sl@0
|
45 |
|
sl@0
|
46 |
//supported pixel formats for these test cases
|
sl@0
|
47 |
_LIT(KUidPixelFormatARGB_8888, "PixelFormatARGB_8888");
|
sl@0
|
48 |
_LIT(KUidPixelFormatARGB_8888_PRE, "PixelFormatARGB_8888_PRE");
|
sl@0
|
49 |
_LIT(KUidPixelFormatRGB_565, "PixelFormatRGB_565");
|
sl@0
|
50 |
|
sl@0
|
51 |
//Child application
|
sl@0
|
52 |
_LIT(KStressTestClientApp, "z:\\sys\\bin\\eglteststressprocesssgimage.exe");
|
sl@0
|
53 |
|
sl@0
|
54 |
//Panic string
|
sl@0
|
55 |
_LIT(KStressTestMainAppPanic, "Stress Test Main App");
|
sl@0
|
56 |
|
sl@0
|
57 |
_LIT(KStress, "Stress");
|
sl@0
|
58 |
NONSHARABLE_CLASS(CEglTest_Stress) : public CEglTestStep
|
sl@0
|
59 |
{
|
sl@0
|
60 |
public:
|
sl@0
|
61 |
~CEglTest_Stress();
|
sl@0
|
62 |
TVerdict doTestStepL();
|
sl@0
|
63 |
|
sl@0
|
64 |
private:
|
sl@0
|
65 |
void PaintSurfaceL(EGLDisplay aDisplay, EGLSurface aSurface, EGLContext aContext);
|
sl@0
|
66 |
void CreateChildProcessL(TInt aProcessNumber, TTestType aTestType, TSgDrawableId aDrawableId);
|
sl@0
|
67 |
void CreateChildProcessesL();
|
sl@0
|
68 |
void ClearDownArraysL(EGLDisplay aDisplay);
|
sl@0
|
69 |
void CreateSimLoadAppL();
|
sl@0
|
70 |
void CreateSimLoadProcessL(const TDesC& aApp);
|
sl@0
|
71 |
void DestroySimLoadProcess();
|
sl@0
|
72 |
void ReadIniValueL(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult);
|
sl@0
|
73 |
void ReadIniValuesL();
|
sl@0
|
74 |
void PrintConfigDataL();
|
sl@0
|
75 |
void DeleteConfigData();
|
sl@0
|
76 |
|
sl@0
|
77 |
private:
|
sl@0
|
78 |
TPtrC iPixelFormat;
|
sl@0
|
79 |
TInt iNumberRSgImages;
|
sl@0
|
80 |
TInt iNumberChildProcesses;
|
sl@0
|
81 |
TInt iNumberMainImages;
|
sl@0
|
82 |
TInt iRSgImageWidth;
|
sl@0
|
83 |
TInt iRSgImageHeight;
|
sl@0
|
84 |
TInt iSimLoadValue;
|
sl@0
|
85 |
TInt iByteSize;
|
sl@0
|
86 |
TUidPixelFormat iFormat;
|
sl@0
|
87 |
VGImageFormat iVgFormat;
|
sl@0
|
88 |
TBool iAlphaPre;
|
sl@0
|
89 |
TTestType iTestType;
|
sl@0
|
90 |
RArray<RSgImage> iSgImageArray;
|
sl@0
|
91 |
RArray<VGImage> iVGImageArray;
|
sl@0
|
92 |
RArray<EGLSurface> iSurfaceArray;
|
sl@0
|
93 |
RArray<RProcess> iProcessArray;
|
sl@0
|
94 |
RArray<RProcess> iProcessList;
|
sl@0
|
95 |
RFs iFs;
|
sl@0
|
96 |
};
|
sl@0
|
97 |
|
sl@0
|
98 |
class CTReadWriteMain : public CTReadWrite
|
sl@0
|
99 |
{
|
sl@0
|
100 |
public:
|
sl@0
|
101 |
static CTReadWriteMain* NewL(EGLDisplay aDisplay, EGLSurface aSurface, EGLContext aContext, TInt aWidth, TInt aHeight, TInt aByteSize, VGImageFormat aFormat, TBool& aTestPass, TInt& aFinishedCounter, const TTestType& aTestType, VGImage aVGImage = 0);
|
sl@0
|
102 |
|
sl@0
|
103 |
private:
|
sl@0
|
104 |
CTReadWriteMain(EGLDisplay aDisplay, EGLSurface aSurface, EGLContext aContext, TInt aWidth, TInt aHeight, TInt aByteSize, VGImageFormat aFormat, TBool& aTestPass, TInt& aFinishedCounter, const TTestType& aTestType);
|
sl@0
|
105 |
void ConstructL(VGImage aVGImage);
|
sl@0
|
106 |
void ReadImageFuncL();
|
sl@0
|
107 |
void ReadFuncL();
|
sl@0
|
108 |
void WriteImageFuncL();
|
sl@0
|
109 |
void VgImageFuncL();
|
sl@0
|
110 |
void MakeCurrentL() const;
|
sl@0
|
111 |
TBool IsFinished();
|
sl@0
|
112 |
void PixmapSurfaceFuncL();
|
sl@0
|
113 |
|
sl@0
|
114 |
private:
|
sl@0
|
115 |
EGLDisplay iDisplay;
|
sl@0
|
116 |
EGLSurface iSurface;
|
sl@0
|
117 |
EGLContext iContext;
|
sl@0
|
118 |
TInt& iFinishedCounter;
|
sl@0
|
119 |
VGImage iVGImage;
|
sl@0
|
120 |
};
|
sl@0
|
121 |
|
sl@0
|
122 |
#endif //__EGLTEST_STRESS_SGIMAGE_H__
|