1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/egl/egltest/inc/egltestcommonsgimageinfo.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,71 @@
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 +*/
1.23 +
1.24 +#ifndef EGLTESTCOMMONSGIMAGEINFO_H
1.25 +#define EGLTESTCOMMONSGIMAGEINFO_H
1.26 +
1.27 +#ifdef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
1.28 +#include <sgresource/sgimage.h>
1.29 +#else
1.30 +#include <graphics/sgimage.h>
1.31 +#endif //SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
1.32 +#include <test/egltestcommonsession.h>
1.33 +
1.34 +/* Common base class, TSgImageInfoTest contains constructors, */
1.35 +/* copy constructor and a comparison operaror */
1.36 +/* Constructors can be used to modify the default pixelformat and */
1.37 +/* pixmap size if desired */
1.38 +/* The concept is that the base class will initialise the bulk of */
1.39 +/* the TSgImageInfo member data and each derived class can modify */
1.40 +/* the iUsage variable to be specific to it's particular type */
1.41 +/* The base class can be instantiated in the rare situation that */
1.42 +/* the iUsage member var does not match that of any derived class */
1.43 +/* e.g iUsage = ESgUsageBitOpenVgImage | ESgUsageBitOpenVgSurface */
1.44 +
1.45 +//Common base class
1.46 +class TSgImageInfoTest : public TSgImageInfo
1.47 + {
1.48 +public:
1.49 + IMPORT_C TSgImageInfoTest();
1.50 + IMPORT_C TSgImageInfoTest(TUidPixelFormat aPixelformat, TSize aSize = KPixmapSize);
1.51 + IMPORT_C ~TSgImageInfoTest();
1.52 + void operator=(const TSgImageInfo& aInfo);
1.53 + TBool operator==(const TSgImageInfo& aInfo);
1.54 + };
1.55 +
1.56 +/* OpenVgImage Child variant */
1.57 +class TSgImageInfoOpenVgImage : public TSgImageInfoTest
1.58 + {
1.59 +public:
1.60 + IMPORT_C TSgImageInfoOpenVgImage();
1.61 + IMPORT_C TSgImageInfoOpenVgImage(TUidPixelFormat aPixelFormat, TSize aSize = KPixmapSize);
1.62 + IMPORT_C ~TSgImageInfoOpenVgImage();
1.63 + };
1.64 +
1.65 +/* OpenVgTarget Child variant */
1.66 +class TSgImageInfoOpenVgTarget : public TSgImageInfoTest
1.67 + {
1.68 +public:
1.69 + IMPORT_C TSgImageInfoOpenVgTarget();
1.70 + IMPORT_C TSgImageInfoOpenVgTarget(TUidPixelFormat aPixelFormat, TSize aSize = KPixmapSize);
1.71 + IMPORT_C ~TSgImageInfoOpenVgTarget();
1.72 + };
1.73 +
1.74 +#endif // EGLTESTCOMMONSGIMAGEINFO_H