os/graphics/graphicsdeviceinterface/directgdi/test/tbitbltbase.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsdeviceinterface/directgdi/test/tbitbltbase.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,89 @@
     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 +/**
    1.20 + @file
    1.21 + @test
    1.22 + @internalComponent - Internal Symbian test code 
    1.23 +*/
    1.24 +
    1.25 +#ifndef __TBITBLTBASE_H__
    1.26 +#define __TBITBLTBASE_H__
    1.27 +
    1.28 +#include "tdirectgdi_test_step_base.h"
    1.29 +#include <bitdev.h>
    1.30 +
    1.31 +// target bitmap size
    1.32 +static const TSize KTarget1Size(200, 200);
    1.33 +static const TSize KTarget2Size(512, 512); // large target
    1.34 +// source bitmap size
    1.35 +static const TSize KBitmap1Size(20, 20);
    1.36 +static const TSize KBitmap2Size(200, 200);
    1.37 +
    1.38 +/**
    1.39 +Type of BitBlt family function
    1.40 +*/
    1.41 +enum TBitBltFuncType
    1.42 +	{
    1.43 +	EBitBlt,
    1.44 +	EDrawBitmap,
    1.45 +	EBitBltMasked,
    1.46 +	EDrawBitmapMasked
    1.47 +	};
    1.48 +
    1.49 +/**
    1.50 +Base class for BitBlt() family tests.
    1.51 +*/
    1.52 +class CTBitBltBase : public CTDirectGdiStepBase
    1.53 +	{
    1.54 +public:
    1.55 +	CTBitBltBase();
    1.56 +	~CTBitBltBase();
    1.57 +
    1.58 +protected:
    1.59 +	// base tests
    1.60 +	void TestPositioningBaseL(const TDesC& aTestName, TBitBltFuncType aFunc);
    1.61 +	void TestInvalidParametersBaseL(const TDesC& /*aTestName*/, TBitBltFuncType aFunc);
    1.62 +	void TestSourceBitmapCloningBaseL(const TDesC& aTestName, TBitBltFuncType aFunc);
    1.63 +
    1.64 +	// helper functions
    1.65 +	void WriteTargetOutput(TPtrC aTestCaseName);
    1.66 +	virtual void CreateBitmapsL(TUidPixelFormat aPixelFormat);
    1.67 +	virtual void DeleteBitmaps();
    1.68 +
    1.69 +	// From CStepStep
    1.70 +	virtual TVerdict doTestStepPreambleL();
    1.71 +	virtual TVerdict doTestStepL();
    1.72 +	virtual TVerdict doTestStepPostambleL();
    1.73 +
    1.74 +	void RunBasicTests();
    1.75 +
    1.76 +private:
    1.77 +	virtual void TestBasicL() = 0;
    1.78 +
    1.79 +protected:
    1.80 +	TBool iLargeTarget;
    1.81 +	CFbsBitmap* iNotInitialisedBitmap;
    1.82 +	CFbsBitmap* iZeroSizeBitmap;
    1.83 +	CFbsBitmap* iCompressedBitmap;
    1.84 +	CFbsBitmap* iCheckedBoardBitmap1;
    1.85 +	CFbsBitmap* iCheckedBoardBitmap2;
    1.86 +	CFbsBitmap* iConcentricRectsBitmap1;
    1.87 +	CFbsBitmap* iConcentricRectsBitmap2;
    1.88 +	CFbsBitmap* iCheckedBoardWithAlphaBitmap;
    1.89 +	CFbsBitmap* iCompressedBitmapSmall;
    1.90 +	};
    1.91 +
    1.92 +#endif