os/graphics/graphicstest/uibench/s60/src/te_graphicsperformancesuiteserver_s60.cpp
Update contrib.
1 // Copyright (c) 2006-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
21 #include "te_graphicsperformancesuiteserver_s60.h"
22 #include "ttextlistscroll.h"
23 #include "tfullscreentext.h"
24 #include "tuiandvideo.h"
25 #include "tcomplexfonts.h"
26 #include "tfontmultiplesizes.h"
29 #include "tflowwindowstest.h"
30 #include "trotateteststep.h"
31 #include "tflowwindowstestopenglvg.h"
32 #include "tsmallwindowstest.h"
33 #include "tsmallwindowstestopengl.h"
34 #include "tsmallwindowstestzoom.h"
36 #include "tzordermultiplesurfaces.h"
37 #include "tsmallwindowstestopenvg.h"
38 #include "tsmallwindowstestraster.h"
39 #include "tcopyrect.h"
43 Same code for Secure and non-secure variants
44 Called inside the MainL() function to create and start the
45 CTestServer derived server.
47 @return - Instance of the test server
49 CTe_graphicsperformanceSuite_S60* CTe_graphicsperformanceSuite_S60::NewL()
51 CTe_graphicsperformanceSuite_S60 * server = new (ELeave) CTe_graphicsperformanceSuite_S60();
52 CleanupStack::PushL(server);
54 // Get server name from process so we can use SetCap to change the capabilites and use this server with a different filename
55 RProcess handle = RProcess();
56 TParsePtrC serverName(handle.FileName());
58 server->ConstructL(serverName.Name());
59 CleanupStack::Pop(server);
65 MainL - uses the new Rendezvous() call to sync with the client
69 // Active scheduler only for this thread. Test need to create own active scheduler
70 CActiveScheduler* scheduler = new(ELeave) CActiveScheduler;
71 CActiveScheduler::Install(scheduler);
73 CTe_graphicsperformanceSuite_S60* server = NULL;
75 // Create the CTestServer derived server
76 TRAPD(err,server = CTe_graphicsperformanceSuite_S60::NewL());
79 // Sync with the client and enter the active scheduler
80 RProcess::Rendezvous(KErrNone);
89 Process entry point. Called by client using RProcess API
91 @return - Standard Epoc error code on process exit
93 GLDEF_C TInt E32Main()
96 CTrapCleanup* cleanup = CTrapCleanup::New();
108 Secure and non-secure variants
109 Implementation of CTestServer pure virtual
111 @return - A CTestStep derived instance
113 CTestStep* CTe_graphicsperformanceSuite_S60::CreateTestStep(const TDesC& aStepName)
115 CTestStep* testStep = NULL;
116 if (aStepName == KTTextListScroll)
118 testStep = new CTTextListScroll();
120 else if (aStepName == KFullScreenText)
122 testStep = new CTFullScreenText();
124 else if(aStepName == KTUiAndVideo)
126 testStep = new CTUiAndVideo();
128 else if(aStepName == KTComplexFonts)
130 testStep = new CTComplexFonts();
132 else if(aStepName == KFontMultipleSizesTestStep)
134 testStep = new CTFontMultipleSizesTestStep();
136 else if(aStepName == KTPan)
138 testStep = new CTPan();
140 else if(aStepName == KTScale)
142 testStep = new CTScale();
144 else if(aStepName == KTFlowWindows)
146 testStep = new CTFlowWindowsTest();
148 else if(aStepName == KTRotateTestStep)
150 testStep = new CTRotateTestStep();
152 else if(aStepName == KTFlowWindowsOpenGLVG)
154 testStep = new CTFlowWindowsTestOpenGLVG();
156 else if(aStepName == KTSmallWindows)
158 testStep = new CTSmallWindowsTest();
160 else if(aStepName == KTSmallWindowsOpenGL)
162 testStep = new CTSmallWindowsTestOpenGL();
164 else if(aStepName == KTSmallWindowsZoom)
166 testStep = new CTSmallWindowsTestZoom();
168 else if(aStepName == KTZOrder)
170 testStep = new CTZOrder();
172 else if(aStepName == KTZOrderMultipleSurfaces)
174 testStep = new CTZOrderMultipleSurfaces();
176 else if(aStepName == KTSmallWindowsOpenVG)
178 testStep = new CTSmallWindowsTestOpenVG();
180 else if(aStepName == KTSmallWindowsRaster)
182 testStep = new CTSmallWindowsTestRaster();
184 else if(aStepName == KTCopyRect)
186 testStep = new CTCopyRect();