graphicstest/uibench/src/tgraphicsresource.h
author Faisal Memon <faisal.memon@nokia.com>
Fri, 02 Jul 2010 18:48:10 +0100
branchEGL_MERGE
changeset 118 6aeef2faff80
parent 0 5d03bc08d59c
permissions -rw-r--r--
Incorporated most of Emilo's changes. His VG changes lead to a panic from window server. It may be a circular deadlockproblem where Wserv is a client of EGL which is a client of Wserv, thus circular. Need to look at it further. I also fixed the arrangement of def files, and didn't take the VG mmp file changes, as I don't think they are appropriate to a stand alone real EGL implmentation. Still need to pull in Emilo's graphicscomposition changes.

// Copyright (c) 2007-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:
//

/**
 @file
 @test
 @internalComponent - Internal Symbian test code 
*/
 
#ifndef TGRAPHICSRESOURCE_H
#define TGRAPHICSRESOURCE_H

#include "te_graphicsperformanceSuiteStepBase.h"
#ifndef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
#include <graphics/sgimage.h>
#endif
// The size of the image data in TUints. 
const TInt KMaxArraySize = 360000;
// The datastride to use when creating an RSgImage.
const TInt KImageDataStride = 16;

class CTGraphicsResource : public CTe_graphicsperformanceSuiteStepBase
	{
public:
	CTGraphicsResource();
	~CTGraphicsResource();

private:
	static void CloseAndDestroyImageHandle(TAny* aPtr);
	void ImageCreationL(const TSize aSizes[], TInt aMaxNumImages);
	void ImageCreationSimpleL(const TInt aWidth, const TInt aHeight, const TDesC& aTestDescription);
	void SmallImageCreationSimpleL();
	void LargeImageCreationSimpleL();
	void ImageDuplicateL();
	void ImageDuplicateHandleL();
	void ImageMapL();
	
	// From CTestStep
	virtual TVerdict doTestStepL();

private:
#ifndef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
	TSgImageInfo iImageInfo;
#endif
	TUint16 iImageData[KMaxArraySize];
	};

_LIT(KTGraphicsResource,"tgraphicsresourceperformance");

#endif