os/graphics/graphicsdeviceinterface/bitgdi/tbit/tbitblt.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsdeviceinterface/bitgdi/tbit/tbitblt.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,77 @@
     1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __TBITBLT_H__
    1.20 +#define __TBITBLT_H__
    1.21 +
    1.22 +#include <bitdev.h>
    1.23 +#include "TGraphicsHarness.h"
    1.24 +
    1.25 +
    1.26 +/**
    1.27 +Creates a virtual bitmap device if a real screen device of the specified display mode is not supported by the hardware
    1.28 +*/
    1.29 +class CVirtualBitmapDevice : public CBase
    1.30 +	{
    1.31 +public:
    1.32 +	virtual ~CVirtualBitmapDevice();
    1.33 +	static CVirtualBitmapDevice* NewL(TDisplayMode aDisplayMode, TSize aSize);
    1.34 +	void Update();
    1.35 +	CBitmapDevice& BitmapDevice();
    1.36 +
    1.37 +private:
    1.38 +	void ConstructL(TDisplayMode aDisplayMode, TSize aSize);
    1.39 +
    1.40 +private:
    1.41 +	CBitmapDevice* iBitmapDevice;	// The vitural or real screen device
    1.42 +	CFbsBitmap* iBitmap;			// Virtual bitmap
    1.43 +	TBool iIsScreenDevice; 			// ETrue if the hardware supports the screen device at the specified display mode
    1.44 +	};
    1.45 +
    1.46 +
    1.47 +class CTBitBlt : public CTGraphicsBase
    1.48 +	{
    1.49 +public:
    1.50 +	CTBitBlt(CTestStep* aStep);
    1.51 +	~CTBitBlt();
    1.52 +protected:
    1.53 +	//from 	CTGraphicsStep
    1.54 +	virtual void RunTestCaseL(TInt aCurTestCase);
    1.55 +
    1.56 +	void ConstructL();
    1.57 +	void TestBitBltPositionsL(TBool aDoCompressed);
    1.58 +	TUint8* CaptureDeviceDataLC(CBitmapDevice& aDevice, TInt& aScreenByteSize);
    1.59 + 	TInt CreateBitmapImageAndCompareL(CVirtualBitmapDevice& aDevice, CFbsBitGc& aGc, TSize aScreenSize, TSize aBitmapSize, TDisplayMode aScreenMode, TPoint aOffset, TRect& aRect);
    1.60 + 	void SimpleBitBltAndTestL(CVirtualBitmapDevice& aDevice, CFbsBitGc& aGc, CFbsBitmap& aBitmap, TDisplayMode aScreenMode, TPoint aStartPoint, TRect& aRect);
    1.61 +
    1.62 +private:
    1.63 +	CFbsBitmap *iBitmap;
    1.64 +	CVirtualBitmapDevice* iVirtualBmpDevice;
    1.65 +	};
    1.66 +
    1.67 +class CTBitBltStep : public CTGraphicsStep
    1.68 +	{
    1.69 +public:
    1.70 +	CTBitBltStep();
    1.71 +protected:
    1.72 +	//from CTGraphicsStep
    1.73 +	virtual CTGraphicsBase* CreateTestL();
    1.74 +	virtual void TestSetupL();
    1.75 +	virtual void TestClose();
    1.76 +	};
    1.77 +
    1.78 +_LIT(KTBitBltStep,"TBitGDIBitBlt");
    1.79 +
    1.80 +#endif