os/graphics/egl/egltest/endpointtestsuite/automated/tinc/egltest_endpoint_images.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/egl/egltest/endpointtestsuite/automated/tinc/egltest_endpoint_images.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,97 @@
     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 __EGLTEST_ENDPOINT_IMAGE_H__
    1.26 +#define __EGLTEST_ENDPOINT_IMAGE_H__
    1.27 +
    1.28 +#include <e32std.h>
    1.29 +#include <fbs.h>
    1.30 +#include <EGL/egl.h>
    1.31 +#include <EGL/eglext.h>
    1.32 +#include <VG/openvg.h>
    1.33 +
    1.34 +// Class Hierarchy to manage a set of images, based on an index.
    1.35 +
    1.36 +class CTestImage: public CBase
    1.37 +    {
    1.38 +public:
    1.39 +    virtual ~CTestImage();
    1.40 +    virtual TRgb Pixel(TInt aX, TInt aY) const = 0;
    1.41 +    virtual TSize Size() const = 0;
    1.42 +    TBool CompareImageL(const CTestImage *aImage, TBool aExecptError) const;
    1.43 +    TBool IsSolidColourL() const;
    1.44 +private:
    1.45 +    static TBool ComparePixel(TRgb aPixel1, TRgb aPixel2, TBool aExecptError);
    1.46 +protected:
    1.47 +    CTestImage();
    1.48 +public:
    1.49 +    static const TInt KImageCount;
    1.50 +    };
    1.51 +
    1.52 +class CTestCFbsImage: public CTestImage
    1.53 +    {
    1.54 +public:
    1.55 +    static CTestCFbsImage *NewL(TInt aIndex);
    1.56 +    CFbsBitmap *Bitmap();
    1.57 +    virtual ~CTestCFbsImage();
    1.58 +    virtual TRgb Pixel(TInt aX, TInt aY) const;
    1.59 +    virtual TSize Size() const;
    1.60 +protected:
    1.61 +    void ConstructL(TInt aIndex);
    1.62 +    CTestCFbsImage();
    1.63 +
    1.64 +private:
    1.65 +    CFbsBitmap *iBitmap;
    1.66 +    RFbsSession iSession;
    1.67 +    };
    1.68 +
    1.69 +class CTestVgImage: public CTestImage
    1.70 +    {
    1.71 +protected:
    1.72 +    VGImage iVgImage;
    1.73 +    VGImageFormat iDataFormat;
    1.74 +
    1.75 +public:
    1.76 +    static CTestVgImage *NewL(TInt aIndex);
    1.77 +    VGImage VGImage();
    1.78 +    virtual ~CTestVgImage();
    1.79 +    virtual TRgb Pixel(TInt aX, TInt aY) const;
    1.80 +    virtual TSize Size() const;
    1.81 +private:
    1.82 +    void ConstructL(TInt aIndex);
    1.83 +protected:
    1.84 +    CTestVgImage();
    1.85 +    };
    1.86 +
    1.87 +
    1.88 +class CTestVgEglImage: public CTestVgImage
    1.89 +    {
    1.90 +public:
    1.91 +    static CTestVgEglImage *New(EGLImageKHR aEglImage);
    1.92 +    static CTestVgEglImage *NewL(EGLImageKHR aEglImage);
    1.93 +private:
    1.94 +    void ConstructL(EGLImageKHR aEglImage);
    1.95 +
    1.96 +    CTestVgEglImage();
    1.97 +    };
    1.98 +
    1.99 +
   1.100 +#endif // __EGLTEST_ENDPOINT_IMAGE_H__