os/graphics/graphicsdeviceinterface/directgdi/test/tbitbltbase.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 /**
    17  @file
    18  @test
    19  @internalComponent - Internal Symbian test code 
    20 */
    21 
    22 #ifndef __TBITBLTBASE_H__
    23 #define __TBITBLTBASE_H__
    24 
    25 #include "tdirectgdi_test_step_base.h"
    26 #include <bitdev.h>
    27 
    28 // target bitmap size
    29 static const TSize KTarget1Size(200, 200);
    30 static const TSize KTarget2Size(512, 512); // large target
    31 // source bitmap size
    32 static const TSize KBitmap1Size(20, 20);
    33 static const TSize KBitmap2Size(200, 200);
    34 
    35 /**
    36 Type of BitBlt family function
    37 */
    38 enum TBitBltFuncType
    39 	{
    40 	EBitBlt,
    41 	EDrawBitmap,
    42 	EBitBltMasked,
    43 	EDrawBitmapMasked
    44 	};
    45 
    46 /**
    47 Base class for BitBlt() family tests.
    48 */
    49 class CTBitBltBase : public CTDirectGdiStepBase
    50 	{
    51 public:
    52 	CTBitBltBase();
    53 	~CTBitBltBase();
    54 
    55 protected:
    56 	// base tests
    57 	void TestPositioningBaseL(const TDesC& aTestName, TBitBltFuncType aFunc);
    58 	void TestInvalidParametersBaseL(const TDesC& /*aTestName*/, TBitBltFuncType aFunc);
    59 	void TestSourceBitmapCloningBaseL(const TDesC& aTestName, TBitBltFuncType aFunc);
    60 
    61 	// helper functions
    62 	void WriteTargetOutput(TPtrC aTestCaseName);
    63 	virtual void CreateBitmapsL(TUidPixelFormat aPixelFormat);
    64 	virtual void DeleteBitmaps();
    65 
    66 	// From CStepStep
    67 	virtual TVerdict doTestStepPreambleL();
    68 	virtual TVerdict doTestStepL();
    69 	virtual TVerdict doTestStepPostambleL();
    70 
    71 	void RunBasicTests();
    72 
    73 private:
    74 	virtual void TestBasicL() = 0;
    75 
    76 protected:
    77 	TBool iLargeTarget;
    78 	CFbsBitmap* iNotInitialisedBitmap;
    79 	CFbsBitmap* iZeroSizeBitmap;
    80 	CFbsBitmap* iCompressedBitmap;
    81 	CFbsBitmap* iCheckedBoardBitmap1;
    82 	CFbsBitmap* iCheckedBoardBitmap2;
    83 	CFbsBitmap* iConcentricRectsBitmap1;
    84 	CFbsBitmap* iConcentricRectsBitmap2;
    85 	CFbsBitmap* iCheckedBoardWithAlphaBitmap;
    86 	CFbsBitmap* iCompressedBitmapSmall;
    87 	};
    88 
    89 #endif