Merge 1. Pull in cpp files in the performance enhanced Khronos RI OVG files which are newly added. I've ignored platform-specific cpp files for linux, macosx, and null operating systems because this local solution has its own platform glue (i.e. facility to target Bitmaps but no full windowing support). I've ignored sfEGLInterface.cpp because this is used as a bridge to go from EGL to Nokia's Platsim which offers an EGL service. That's not relevant to this implementation because this is ARM side code, not Intel side. I just left a comment to sfEGLInterface.cpp in case we need to pick up this later on. The current code compiles on winscw. Prior to this fix, the code works on winscw, and can launch the SVG tiger (tiger.exe). That takes about 20 seconds to render. I hope to always be able to show this icon on each commit, and the plan is for the render time to reduce with this series of submissions. On this commit, the tiger renders ok in 20 seconds.
// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
// Header for window server auto test code
//
//
#include <e32std.h>
#include <e32math.h>
#include "W32STD.H"
#include "../tlib/testbase.h"
class TestClient;
enum TestState
{
EInvalid,
ENext,
EContinue,
EFinished
};
enum TAutoPanics
{
ETManPanicPcFailed,
};
enum TAutoLeaves
{
ETestFailed=1,
};
class LogWindow : public CTWin
{
public:
LogWindow();
void ConstructL(CTWinBase &parent);
void Draw();
void LogTest(TDesC &aTitle,TInt aNum);
private:
TBuf<0x40> iTestTitle;
TInt iTitleHeight;
};
class CTestBase;
class BorderWindow : public CTWin
{
public:
BorderWindow();
void ConstructL(CTWinBase &parent);
void Draw();
};
class TestWindow : public CTWin
{
public:
TestWindow();
void Draw();
void SetUpL(TPoint pos,TSize size,CTWinBase *parent, CWindowGc &aGc);
private:
BorderWindow *iBorderWin;
friend class CTestBase;
};
class TestDriver : public CActive
{
public:
TestDriver(TestClient *aClient);
~TestDriver();
void DoCancel();
void RunL();
void Request();
void TestComplete();
void DestroyTest();
TestClient *Client();
public:
CTestBase *iTest;
private:
TInt iTestNum;
TestClient *iClient;
};
class CTestBase : public CActive
{
public:
CTestBase(const TDesC &aTitle);
~CTestBase();
void DoCancel();
void RunL();
void Request();
void TestL(TInt aCondition);
void StartTest(TInt aNum, TestDriver *aDriver);
void LogSubTest(const TDesC &aTitle,TInt aNum);
void TestPanic(TThreadFunction aFunction, TAny *aPtr, TInt aExitReason, const TDesC &aCategory);
void TestWsPanic(TThreadFunction aFunction, TAny *aPtr, TInt aExitReason);
void TestWsPanic(TThreadFunction aFunction, TInt aInt, TInt aExitReason);
void TriggerFail();
void LogLeave(TInt aErr);
void CheckRect(CTWin *aWin1,CTWin *aWin2,const TRect &aRect);
void CompareWindows(TRect &aRect);
void CompareWindows();
void CheckBorder();
void DrawTestBackground(TBool aInvertColours);
inline TestDriver *Driver();
virtual TestState DoTestL()=0;
virtual void ConstructL()=0;
TestClient *Client();
void AbortL();
protected:
TestDriver *iDriver;
TAny *iBuf1;
TAny *iBuf2;
private:
TInt iTestNum;
TInt iSubTestNum;
TBuf<0x40> iTitle;
TBuf<0x40> iSubTitle;
TBool iFail; // Used to trigger failures to test test code.
};
class TestClient : public CTClient
{
public:
TestClient();
~TestClient();
void ConstructL();
void KeyL(const TKeyEvent &aKey,const TTime &aTime);
void Shutdown();
TestDriver *Driver();
private:
TestDriver *iDriver;
};
GLREF_D CWindowGc *TheGc;
GLREF_C void TManPanic(TInt aPanic);
inline TestDriver *CTestBase::Driver()
{return(iDriver);}