os/graphics/graphicsdeviceinterface/directgdiadaptation/hwsrc/directgdiimagetargetimpl.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/graphicsdeviceinterface/directgdiadaptation/hwsrc/directgdiimagetargetimpl.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,54 @@
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 + @internalComponent Reference implementation of Open VG hardware accelerated Direct GDI adaptation.
1.22 +*/
1.23 +
1.24 +#ifndef DIRECTGDIIMAGETARGETIMPL_H
1.25 +#define DIRECTGDIIMAGETARGETIMPL_H
1.26 +
1.27 +#include "directgdiimageref.h"
1.28 +#include <EGL/egl.h>
1.29 +#include <VG/openvg.h>
1.30 +#include <graphics/sgimage.h>
1.31 +#include <e32hashtab.h>
1.32 +#include <e32base.h>
1.33 +
1.34 +class CDirectGdiDriverImpl;
1.35 +
1.36 +/**
1.37 +Container for holding an RDirectGdiImageTarget and its associated EGLSurface.
1.38 +Reference counted as more than one CDirectGdiContext is allowed to use the same RDirectGdiImageTarget.
1.39 +*/
1.40 +NONSHARABLE_CLASS(CDirectGdiImageTargetImpl): public CDirectGdiImageRef
1.41 + {
1.42 +public:
1.43 + static TInt New(CDirectGdiImageTargetImpl*& aImage, CDirectGdiDriverImpl& aDriver, const RSgImage& aSgImage, RHashMap<TInt, EGLContext>& aContexts, RHashMap<TInt, EGLConfig>& aConfigs, EGLContext& aSharedContext);
1.44 + virtual ~CDirectGdiImageTargetImpl();
1.45 + TBool Activate();
1.46 +
1.47 +private:
1.48 + CDirectGdiImageTargetImpl(CDirectGdiDriverImpl& aDriver);
1.49 + TInt Construct(const RSgImage& aSgImage, RHashMap<TInt, EGLContext>& aContexts, RHashMap<TInt, EGLConfig>& aConfigs, EGLContext& aSharedContext);
1.50 +
1.51 +private:
1.52 + CDirectGdiDriverImpl& iDriver;
1.53 + EGLSurface iSurface;
1.54 + EGLContext iContext;
1.55 + };
1.56 +
1.57 +#endif /*DIRECTGDIIMAGETARGETIMPL_H_*/