os/graphics/graphicsdeviceinterface/directgdiadaptation/hwsrc/directgdiimagesourceimpl.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     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  @internalComponent Reference implementation of OpenVG hardware accelerated DirectGDI adaptation.
    19 */
    20 
    21 #ifndef DIRECTGDIIMAGESOURCEIMPL_H
    22 #define DIRECTGDIIMAGESOURCEIMPL_H
    23 
    24 #include "directgdiimageref.h"
    25 #include <e32base.h>
    26 #include <EGL/egl.h>
    27 #include <VG/openvg.h>
    28 #include <graphics/sgimage.h>
    29 
    30 class CDirectGdiDriverImpl;
    31 class XDirectGdiDriverProcessState;
    32 
    33 /**
    34 Container for holding an RDirectGdiDrawableSource and its associated EGLSurface.
    35 May be reference counted if more than one CDirectGdiContext is allowed to 
    36 use the same RDirectGdiDrawableSource.
    37 */
    38 NONSHARABLE_CLASS(CDirectGdiImageSourceImpl): public CDirectGdiImageRef
    39 	{
    40 public:
    41 	static TInt New(CDirectGdiImageSourceImpl*& aImage, CDirectGdiDriverImpl& aDriver, const RSgImage& aSgImage);
    42 	virtual ~CDirectGdiImageSourceImpl();
    43 	inline VGImage VgImage() const;
    44 
    45 private:
    46 	CDirectGdiImageSourceImpl(CDirectGdiDriverImpl& aDriver);
    47 	virtual TInt Construct(const RSgImage& aSgImage);
    48 	
    49 private:		
    50 	CDirectGdiDriverImpl& iDriver;
    51 	VGImage iVgImage;
    52 	};
    53 	
    54 inline VGImage CDirectGdiImageSourceImpl::VgImage() const
    55 	{
    56 	return iVgImage;
    57 	}
    58 
    59 #endif /*DIRECTGDIIMAGESOURCEIMPL_H_*/