graphicsdeviceinterface/bitgdi/tbit/tbitblt.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2007-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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __TBITBLT_H__
       
    17 #define __TBITBLT_H__
       
    18 
       
    19 #include <bitdev.h>
       
    20 #include "TGraphicsHarness.h"
       
    21 
       
    22 
       
    23 /**
       
    24 Creates a virtual bitmap device if a real screen device of the specified display mode is not supported by the hardware
       
    25 */
       
    26 class CVirtualBitmapDevice : public CBase
       
    27 	{
       
    28 public:
       
    29 	virtual ~CVirtualBitmapDevice();
       
    30 	static CVirtualBitmapDevice* NewL(TDisplayMode aDisplayMode, TSize aSize);
       
    31 	void Update();
       
    32 	CBitmapDevice& BitmapDevice();
       
    33 
       
    34 private:
       
    35 	void ConstructL(TDisplayMode aDisplayMode, TSize aSize);
       
    36 
       
    37 private:
       
    38 	CBitmapDevice* iBitmapDevice;	// The vitural or real screen device
       
    39 	CFbsBitmap* iBitmap;			// Virtual bitmap
       
    40 	TBool iIsScreenDevice; 			// ETrue if the hardware supports the screen device at the specified display mode
       
    41 	};
       
    42 
       
    43 
       
    44 class CTBitBlt : public CTGraphicsBase
       
    45 	{
       
    46 public:
       
    47 	CTBitBlt(CTestStep* aStep);
       
    48 	~CTBitBlt();
       
    49 protected:
       
    50 	//from 	CTGraphicsStep
       
    51 	virtual void RunTestCaseL(TInt aCurTestCase);
       
    52 
       
    53 	void ConstructL();
       
    54 	void TestBitBltPositionsL(TBool aDoCompressed);
       
    55 	TUint8* CaptureDeviceDataLC(CBitmapDevice& aDevice, TInt& aScreenByteSize);
       
    56  	TInt CreateBitmapImageAndCompareL(CVirtualBitmapDevice& aDevice, CFbsBitGc& aGc, TSize aScreenSize, TSize aBitmapSize, TDisplayMode aScreenMode, TPoint aOffset, TRect& aRect);
       
    57  	void SimpleBitBltAndTestL(CVirtualBitmapDevice& aDevice, CFbsBitGc& aGc, CFbsBitmap& aBitmap, TDisplayMode aScreenMode, TPoint aStartPoint, TRect& aRect);
       
    58 
       
    59 private:
       
    60 	CFbsBitmap *iBitmap;
       
    61 	CVirtualBitmapDevice* iVirtualBmpDevice;
       
    62 	};
       
    63 
       
    64 class CTBitBltStep : public CTGraphicsStep
       
    65 	{
       
    66 public:
       
    67 	CTBitBltStep();
       
    68 protected:
       
    69 	//from CTGraphicsStep
       
    70 	virtual CTGraphicsBase* CreateTestL();
       
    71 	virtual void TestSetupL();
       
    72 	virtual void TestClose();
       
    73 	};
       
    74 
       
    75 _LIT(KTBitBltStep,"TBitGDIBitBlt");
       
    76 
       
    77 #endif