graphicscomposition/openwfcompositionengine/test/tscreeninterface/tscreeninterface.h
changeset 152 9f1c3fea0f87
equal deleted inserted replaced
111:29ddb8a72f0e 152:9f1c3fea0f87
       
     1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     2 //
       
     3 // Permission is hereby granted, free of charge, to any person obtaining a
       
     4 // copy of this software and/or associated documentation files (the
       
     5 // "Materials"), to deal in the Materials without restriction, including
       
     6 // without limitation the rights to use, copy, modify, merge, publish,
       
     7 // distribute, sublicense, and/or sell copies of the Materials, and to
       
     8 // permit persons to whom the Materials are furnished to do so, subject to
       
     9 // the following conditions:
       
    10 //
       
    11 // The above copyright notice and this permission notice shall be included
       
    12 // in all copies or substantial portions of the Materials.
       
    13 //
       
    14 // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
       
    15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
       
    16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
       
    17 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
       
    18 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
       
    19 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
       
    20 // MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
       
    21 //
       
    22 // Description:
       
    23 //
       
    24 
       
    25 #ifndef TSCREENINTERFACE_H
       
    26 #define TSCREENINTERFACE_H
       
    27 
       
    28 // INCLUDES
       
    29 #include <test/tefunit.h>
       
    30 #include <w32std.h>
       
    31 #include <khronos_types.h>
       
    32 #include <graphics/symbianstream.h>
       
    33 #include "streamutility.h"
       
    34 
       
    35 class CTestExecuteLogger;
       
    36 class CSurfaceStream;
       
    37 /**
       
    38  *  CTestScreenInterface
       
    39  * 
       
    40  */
       
    41 class CTestScreenInterface : public CTestFixture
       
    42 	{
       
    43 public:
       
    44 	CTestScreenInterface();
       
    45 	~CTestScreenInterface();
       
    46 
       
    47 	virtual void SetupL();
       
    48 	virtual void TearDownL();
       
    49 	void TearDown();
       
    50 	static CTestSuite* CreateSuiteL(const TDesC& aName);
       
    51 	
       
    52     enum TCacheAttribute
       
    53         {
       
    54         /** not CPU cached */
       
    55         ENotCached = 0,
       
    56         /** CPU cached */
       
    57         ECached = 1,
       
    58         /** Not listed */
       
    59         ECacheNotlisted = 2
       
    60         };
       
    61 
       
    62     enum TContiguousFlag
       
    63         {
       
    64         ENonContiguous = 0,
       
    65         EContiguous = 1,
       
    66         EFlagNotListed = 2
       
    67         };
       
    68 
       
    69 private:
       
    70     void ReadIniData();
       
    71     TInt BaseTestContiguousFlag(TBool aContiguous);
       
    72 	// Private tests
       
    73 	void GRAPHICS_OPENWFC_SCREENINTERFACE_0100L();
       
    74 	void GRAPHICS_OPENWFC_SCREENINTERFACE_0101L();
       
    75 	void GRAPHICS_OPENWFC_SCREENINTERFACE_0102L();
       
    76 	void GRAPHICS_OPENWFC_SCREENINTERFACE_0103L();
       
    77     void GRAPHICS_OPENWFC_SCREENINTERFACE_0104L();
       
    78     void GRAPHICS_OPENWFC_SCREENINTERFACE_0105L();
       
    79     void GRAPHICS_OPENWFC_SCREENINTERFACE_0106L();
       
    80     void GRAPHICS_OPENWFC_SCREENINTERFACE_0107L();
       
    81     void GRAPHICS_OPENWFC_SCREENINTERFACE_0108L();
       
    82     void GRAPHICS_OPENWFC_SCREENINTERFACE_0109L();
       
    83 
       
    84 private:
       
    85 	CStreamUtility* iUtility;
       
    86 	TRgb iRed, iGreen, iBlue;
       
    87     TInt iFastpathableWidth;
       
    88     TInt iFastpathableHeight;
       
    89     TInt iStride;        
       
    90     TContiguousFlag iContiguous;
       
    91     TUidPixelFormat iFastpathablePixelFormat;
       
    92     TUidPixelFormat iNonFastpathablePixelFormat;
       
    93     TInt iOffsetToFirstBuffer; 
       
    94     TInt iAlignment;           
       
    95     TBool iMappable;
       
    96     TInt iMaxBuffers;              
       
    97     TInt iMinBuffers;
       
    98     TCacheAttribute iCacheAttrib;
       
    99     TInt iOffsetBetweenBuffers;
       
   100 
       
   101 	};
       
   102 
       
   103 #endif // TSCREENINTERFACE_H