os/graphics/graphicsdeviceinterface/directgdiadaptation/hwsrc/directgdiimagetargetimpl.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  @internalComponent Reference implementation of Open VG hardware accelerated Direct GDI adaptation.
    19 */
    20 
    21 #ifndef DIRECTGDIIMAGETARGETIMPL_H
    22 #define DIRECTGDIIMAGETARGETIMPL_H
    23 
    24 #include "directgdiimageref.h"
    25 #include <EGL/egl.h>
    26 #include <VG/openvg.h>
    27 #include <graphics/sgimage.h>
    28 #include <e32hashtab.h>
    29 #include <e32base.h>
    30 
    31 class CDirectGdiDriverImpl;
    32 
    33 /**
    34 Container for holding an RDirectGdiImageTarget and its associated EGLSurface.
    35 Reference counted as more than one CDirectGdiContext is allowed to use the same RDirectGdiImageTarget.
    36 */
    37 NONSHARABLE_CLASS(CDirectGdiImageTargetImpl): public CDirectGdiImageRef
    38 	{
    39 public:
    40 	static TInt New(CDirectGdiImageTargetImpl*& aImage, CDirectGdiDriverImpl& aDriver, const RSgImage& aSgImage, RHashMap<TInt, EGLContext>& aContexts, RHashMap<TInt, EGLConfig>& aConfigs, EGLContext& aSharedContext);
    41 	virtual ~CDirectGdiImageTargetImpl();
    42 	TBool Activate();
    43 	
    44 private:
    45 	CDirectGdiImageTargetImpl(CDirectGdiDriverImpl& aDriver);
    46 	TInt Construct(const RSgImage& aSgImage, RHashMap<TInt, EGLContext>& aContexts, RHashMap<TInt, EGLConfig>& aConfigs, EGLContext& aSharedContext);
    47 	
    48 private:
    49 	CDirectGdiDriverImpl& iDriver;
    50 	EGLSurface iSurface;
    51 	EGLContext iContext;
    52 	};
    53 
    54 #endif /*DIRECTGDIIMAGETARGETIMPL_H_*/