os/graphics/egl/egltest/inc/egltestcommonsgimageinfo.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 */
    20 
    21 #ifndef EGLTESTCOMMONSGIMAGEINFO_H
    22 #define EGLTESTCOMMONSGIMAGEINFO_H
    23 
    24 #ifdef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
    25 #include <sgresource/sgimage.h>
    26 #else
    27 #include <graphics/sgimage.h>
    28 #endif //SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
    29 #include <test/egltestcommonsession.h>
    30 
    31 /* Common base class, TSgImageInfoTest contains constructors,     */
    32 /* copy constructor and a comparison operaror                     */
    33 /* Constructors can be used to modify the default pixelformat and */
    34 /* pixmap size if desired                                         */
    35 /* The concept is that the base class will initialise the bulk of */
    36 /* the TSgImageInfo member data and each derived class can modify */
    37 /* the iUsage variable to be specific to it's particular type     */
    38 /* The base class can be instantiated in the rare situation that  */
    39 /* the iUsage member var does not match that of any derived class */
    40 /* e.g iUsage = ESgUsageBitOpenVgImage | ESgUsageBitOpenVgSurface */
    41 
    42 //Common base class
    43 class TSgImageInfoTest : public TSgImageInfo
    44 	{
    45 public:
    46 	IMPORT_C TSgImageInfoTest();
    47 	IMPORT_C TSgImageInfoTest(TUidPixelFormat aPixelformat, TSize aSize = KPixmapSize);
    48 	IMPORT_C ~TSgImageInfoTest();
    49 	void operator=(const TSgImageInfo& aInfo);
    50 	TBool operator==(const TSgImageInfo& aInfo);
    51 	};
    52 
    53 /* OpenVgImage Child variant */
    54 class TSgImageInfoOpenVgImage : public TSgImageInfoTest
    55 	{
    56 public:
    57 	IMPORT_C TSgImageInfoOpenVgImage();
    58 	IMPORT_C TSgImageInfoOpenVgImage(TUidPixelFormat aPixelFormat, TSize aSize = KPixmapSize);
    59 	IMPORT_C ~TSgImageInfoOpenVgImage();
    60 	};
    61 
    62 /* OpenVgTarget Child variant */
    63 class TSgImageInfoOpenVgTarget : public TSgImageInfoTest
    64 	{
    65 public:
    66 	IMPORT_C TSgImageInfoOpenVgTarget();
    67 	IMPORT_C TSgImageInfoOpenVgTarget(TUidPixelFormat aPixelFormat, TSize aSize = KPixmapSize);
    68 	IMPORT_C ~TSgImageInfoOpenVgTarget();
    69 	};
    70 
    71 #endif // EGLTESTCOMMONSGIMAGEINFO_H