os/graphics/egl/egltest/endpointtestsuite/automated/tinc/egltest_endpointtearing.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/egl/egltest/endpointtestsuite/automated/tinc/egltest_endpointtearing.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,80 @@
1.4 +/*
1.5 +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +/**
1.23 + @file
1.24 + @test
1.25 + @internalComponent - Internal Symbian test code
1.26 +*/
1.27 +
1.28 +
1.29 +#ifndef __EGLTEST_ENDPOINTTEARING_H__
1.30 +#define __EGLTEST_ENDPOINTTEARING_H__
1.31 +
1.32 +
1.33 +#include "localtestbase.h"
1.34 +#include "remotetestbase.h"
1.35 +
1.36 +
1.37 +_LIT(KEGL_EndpointTearing, "EGL_EndpointTearing");
1.38 +NONSHARABLE_CLASS(CEglTest_LocalTestStep_EndpointTearing) : public CLocalTestStepBase
1.39 + {
1.40 +public:
1.41 + CEglTest_LocalTestStep_EndpointTearing();
1.42 + ~CEglTest_LocalTestStep_EndpointTearing();
1.43 + void DoPreambleL();
1.44 + void DoPostambleL();
1.45 + TVerdict doTestStepL();
1.46 +
1.47 +private:
1.48 + void StartDrawThreadL();
1.49 + void StopDrawThread();
1.50 + static TInt DrawThreadEntryPoint(TAny* aSelf);
1.51 + void EnterDrawLoopL();
1.52 +
1.53 +private:
1.54 + RThread iDrawThread;
1.55 + TSurfaceId iSurfaceId;
1.56 + volatile TBool iStopDrawing;
1.57 + RFastLock iStartDraw;
1.58 + RFastLock iFirstDrawDone;
1.59 + };
1.60 +
1.61 +
1.62 +NONSHARABLE_CLASS(CEglTest_RemoteTestStep_EndpointTearing) : public CRemoteTestStepBase
1.63 + {
1.64 +public:
1.65 + CEglTest_RemoteTestStep_EndpointTearing();
1.66 + ~CEglTest_RemoteTestStep_EndpointTearing();
1.67 +
1.68 + virtual TRemoteTestVerdict DoRunRemoteTestCaseL(TInt aTestCase, const TRemoteTestParams& aParams);
1.69 + virtual TRemoteTestVerdict DoStartRemoteTestStepL(const TRemoteTestParams& aMessageIn);
1.70 + virtual TRemoteTestVerdict DoEndRemoteTestStepL(const TRemoteTestParams& aMessageIn);
1.71 +
1.72 +private:
1.73 + TRemoteTestVerdict TearingTestCaseL(const TRemoteTestParams& aParams);
1.74 + TRemoteTestVerdict AcquireAndCheckImageL();
1.75 + TRemoteTestVerdict CheckImageL(EGLImageKHR aEglImage);
1.76 +
1.77 +private:
1.78 + EGLDisplay iDisplay;
1.79 + EGLEndpointNOK iEndpoint;
1.80 + };
1.81 +
1.82 +
1.83 +#endif