14
|
1 |
// Copyright (c) 2010 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 |
// Header file defining Open VG client-side state classes.
|
|
15 |
|
|
16 |
#ifndef VGSTATE_H
|
|
17 |
#define VGSTATE_H
|
|
18 |
|
|
19 |
#include <EGL/egl.h>
|
|
20 |
#include <VG/openvg.h>
|
|
21 |
#include <e32hashtab.h>
|
|
22 |
#include "vghwutils.h"
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
// tracing
|
|
27 |
#include <e32debug.h>
|
|
28 |
#ifdef _DEBUG
|
|
29 |
#define OPENVG_TRACE(fmt, args...) RDebug::Printf(fmt, ##args)
|
|
30 |
#define VGPANIC_ASSERT(condition, panic) if (!(condition)) { VgPanic(panic, #panic, #condition, __FILE__, __LINE__); }
|
|
31 |
#define VGPANIC_ASSERT_DEBUG(condition, panic) if (!(condition)) { VgPanic(panic, #panic, #condition, __FILE__, __LINE__); }
|
|
32 |
#define VGPANIC_ALWAYS(panic) { VgPanic(panic, #panic, NULL, __FILE__, __LINE__); }
|
|
33 |
#else
|
|
34 |
#define OPENVG_TRACE(fmt, args...)
|
|
35 |
#define VGPANIC_ASSERT(condition, panic) if (!(condition)) { VgPanic(panic, NULL, NULL, NULL, __LINE__); }
|
|
36 |
#define VGPANIC_ASSERT_DEBUG(condition, panic)
|
|
37 |
#define VGPANIC_ALWAYS(panic) { VgPanic(panic, NULL, NULL, NULL, __LINE__); }
|
|
38 |
#endif
|
|
39 |
|
|
40 |
|
|
41 |
// Guest Open VG panic codes
|
|
42 |
typedef enum
|
|
43 |
{
|
|
44 |
EVgPanicTemp = 1, // note: for development, references should be replaced with a more specific panic
|
|
45 |
EVgPanicNullPixmapPointer,
|
|
46 |
EVgPanicPixmapSizeError,
|
|
47 |
EVgPanicSingletonAlreadyInitialised,
|
|
48 |
EVgPanicSingletonNotInitialised,
|
|
49 |
EVgPanicNullPointer,
|
|
50 |
EVgPanicBadLastBitsParam,
|
|
51 |
EVgPanicBadRowLengthParam,
|
|
52 |
EVgPanicBadRowCountParam,
|
|
53 |
EVgPanicStrideSmallerThanRowLength, // 10
|
|
54 |
EVgPanicNotReplyOpcode,
|
|
55 |
EVgPanicDeleteInUseVgImageInfo,
|
|
56 |
EVgPanicUidGeneratorZeroSeed,
|
|
57 |
EVgPanicMissingEglInterface,
|
|
58 |
EVgPanicNullCVgHandlePointer,
|
|
59 |
EVgPanicWrongVgHandleType,
|
|
60 |
EVgPanicHandleAlreadyMarkedDestroyed,
|
|
61 |
EVgPanicUnknownVgHandleType,
|
|
62 |
EVgPanicHostHandleIsInvalid,
|
|
63 |
EVgPanicImageParentIsInvalid, // 20
|
|
64 |
EVgPanicFunctionParameterIsNull,
|
|
65 |
EVgPanicValueFromHostVgIsInvalid,
|
|
66 |
EVgPanicHostHandleAlreadySet,
|
|
67 |
EVgPanicParentImageAlreadyDestroyed,
|
|
68 |
EVgPanicStateLockMutexNotHeld,
|
|
69 |
} TVgPanic;
|
|
70 |
|
|
71 |
void VgPanic(TVgPanic aPanicCode, char* aPanicName, char* aCondition, char* aFile, TInt aLine);
|
|
72 |
|
|
73 |
|
|
74 |
// state singleton, in Writeable Static Data memory
|
|
75 |
class XOpenVgState;
|
|
76 |
extern XOpenVgState OpenVgState;
|
|
77 |
|
|
78 |
// classes declared in this header
|
|
79 |
class CVgHandleBase;
|
|
80 |
class CVgImageBase;
|
|
81 |
class CVgMaskLayerInfo;
|
|
82 |
class CVgFontInfo;
|
|
83 |
class CVgImageInfo;
|
|
84 |
class CVgPaintInfo;
|
|
85 |
class CVgPathInfo;
|
|
86 |
class THandleGen;
|
|
87 |
class TVgLockHolder;
|
|
88 |
|
|
89 |
extern const float KFloatMinusOne;
|
|
90 |
|
|
91 |
|
|
92 |
class THandleGen
|
|
93 |
{
|
|
94 |
public:
|
|
95 |
inline void Init(TUint aInit);
|
|
96 |
TUint NextUid();
|
|
97 |
private:
|
|
98 |
TUint iValue;
|
|
99 |
};
|
|
100 |
|
|
101 |
typedef enum
|
|
102 |
{
|
|
103 |
EVgHandleAny = -1, // match any valid handle type, e.g. for vgSetParameteri
|
|
104 |
EVgHandleForFont = 0, // specific types ...
|
|
105 |
EVgHandleForImage,
|
|
106 |
EVgHandleForPaint,
|
|
107 |
EVgHandleForPath,
|
|
108 |
EVgHandleForMaskLayer,
|
|
109 |
} TVgHandleType;
|
|
110 |
|
|
111 |
|
|
112 |
// state structures for VG objects (i.e. anything that is a VGHandle): VGImage, VGPath, VGMaskLayer, VGPaint, VGFont
|
|
113 |
// ToDo review how to handle thread locking these objects whilst they are in use
|
|
114 |
NONSHARABLE_CLASS(CVgHandleBase) : public CBase // Base Class
|
|
115 |
{
|
|
116 |
public:
|
|
117 |
static void InitStatics();
|
|
118 |
|
|
119 |
// public inline methods
|
|
120 |
inline VGHandle HostHandle() const;
|
|
121 |
inline TVgHandleType HandleType() const;
|
|
122 |
inline TBool IsDestroyed() const;
|
|
123 |
inline void SetHostHandle(VGHandle aHostHandle);
|
|
124 |
inline TUint ClientHandle() const;
|
|
125 |
|
|
126 |
// general & specific portions of derived object destruction
|
|
127 |
void Destroy(MVgContext& aVgContext);
|
|
128 |
virtual TBool DestroyObject(MVgContext& aVgContext) = 0;
|
|
129 |
|
|
130 |
// Each VGHandle object type must implement GetParameterVectorSize
|
|
131 |
virtual VGint GetParameterVectorSize(MVgContext& aVgContext, VGint aParamType) = 0;
|
|
132 |
// Base version of GetParameter* uses GetParameterVectorSize to validate aParamType then calls Host VG
|
|
133 |
virtual VGfloat GetParameterf(MVgContext& aVgContext, VGint aParamType);
|
|
134 |
virtual VGint GetParameteri(MVgContext& aVgContext, VGint aParamType);
|
|
135 |
// For details of Base versions of GetParameter*v see vghandle.cpp
|
|
136 |
virtual void GetParameterfv(MVgContext& aVgContext, VGint aParamType, VGint aCount, VGfloat * aValues);
|
|
137 |
virtual void GetParameteriv(MVgContext& aVgContext, VGint aParamType, VGint aCount, VGint * aValues);
|
|
138 |
// Base versions of SetParameter* assume parameters are read-only, and give an error return
|
|
139 |
virtual void SetParameterf(MVgContext& aVgContext, VGint aParamType, VGfloat aValue);
|
|
140 |
virtual void SetParameteri(MVgContext& aVgContext, VGint aParamType, VGint aValue);
|
|
141 |
virtual void SetParameterfv(MVgContext& aVgContext, VGint aParamType, VGint aCount, const VGfloat * aValues);
|
|
142 |
virtual void SetParameteriv(MVgContext& aVgContext, VGint aParamType, VGint aCount, const VGint * aValues);
|
|
143 |
|
|
144 |
protected:
|
|
145 |
inline CVgHandleBase(TVgHandleType aHandleType);
|
|
146 |
inline ~CVgHandleBase();
|
|
147 |
|
|
148 |
VGint HostVgGetParameterVectorSize(MVgContext& aVgContext, VGint aParamType);
|
|
149 |
VGint HostVgGetParameteri(MVgContext& aVgContext, VGint aParamType);
|
|
150 |
VGfloat HostVgGetParameterf(MVgContext& aVgContext, VGint aParamType);
|
|
151 |
void HostVgGetParameterfv(MVgContext& aVgContext, VGint aParamType, VGint aCount, const VGfloat * aValues);
|
|
152 |
void HostVgGetParameteriv(MVgContext& aVgContext, VGint aParamType, VGint aCount, const VGint * aValues);
|
|
153 |
void HostVgSetParameterf(MVgContext& aVgContext, VGint aParamType, VGfloat aValue);
|
|
154 |
void HostVgSetParameteri(MVgContext& aVgContext, VGint aParamType, VGint aValue);
|
|
155 |
void HostVgSetParameterfv(MVgContext& aVgContext, VGint aParamType, VGint aCount, const VGfloat * aValues);
|
|
156 |
void HostVgSetParameteriv(MVgContext& aVgContext, VGint aParamType, VGint aCount, const VGint * aValues);
|
|
157 |
|
|
158 |
protected:
|
|
159 |
TUint iClientHandle;
|
|
160 |
TVgHandleType iHandleType;
|
|
161 |
VGHandle iHostHandle;
|
|
162 |
TBool iIsDestroyed;
|
|
163 |
|
|
164 |
private:
|
|
165 |
static THandleGen iHandleGen; // generator for unique client side handles
|
|
166 |
};
|
|
167 |
|
|
168 |
|
|
169 |
NONSHARABLE_CLASS(CVgImageBase) : public CVgHandleBase
|
|
170 |
{
|
|
171 |
public:
|
|
172 |
inline VGint Width() const;
|
|
173 |
inline VGint Height() const;
|
|
174 |
|
|
175 |
TBool DestroyObject(MVgContext& aVgContext) = 0;
|
|
176 |
|
|
177 |
virtual VGint GetParameterVectorSize(MVgContext& aVgContext, VGint aParamType) = 0;
|
|
178 |
|
|
179 |
protected:
|
|
180 |
inline CVgImageBase(TVgHandleType aHandleType, VGint aWidth, VGint aHeight);
|
|
181 |
|
|
182 |
protected:
|
|
183 |
VGint const iWidth;
|
|
184 |
VGint const iHeight;
|
|
185 |
};
|
|
186 |
|
|
187 |
|
|
188 |
NONSHARABLE_CLASS(CVgMaskLayerInfo) : public CVgImageBase
|
|
189 |
{
|
|
190 |
public:
|
|
191 |
static CVgMaskLayerInfo* New(VGint aWidth, VGint aHeight);
|
|
192 |
virtual TBool DestroyObject(MVgContext& aVgContext);
|
|
193 |
|
|
194 |
virtual VGint GetParameterVectorSize(MVgContext& aVgContext, VGint aParamType);
|
|
195 |
|
|
196 |
// Mask specific operations
|
|
197 |
void FillMaskLayer(MVgContext& aVgContext, VGint aX, VGint aY, VGint aWidth, VGint aHeight, VGfloat aValue);
|
|
198 |
void CopyMask(MVgContext& aVgContext, VGint aSx, VGint aSy, VGint aDx, VGint aDy, VGint aWidth, VGint aHeight);
|
|
199 |
|
|
200 |
private:
|
|
201 |
inline CVgMaskLayerInfo(VGint aWidth, VGint aHeight);
|
|
202 |
inline ~CVgMaskLayerInfo();
|
|
203 |
};
|
|
204 |
|
|
205 |
|
|
206 |
NONSHARABLE_CLASS(CVgImageInfo) : public CVgImageBase
|
|
207 |
{
|
|
208 |
public:
|
|
209 |
static CVgImageInfo* New(VGImageFormat aFormat, VGint aWidth, VGint aHeight, VGbitfield aAllowedQuality);
|
|
210 |
static CVgImageInfo* New(VGImageFormat aFormat, VGint aWidth, VGint aHeight, EGLImageKHR aEglImage, TUint64& aSgImageId);
|
|
211 |
static CVgImageInfo* New(VGint aWidth, VGint aHeight, CVgImageInfo* aParent);
|
|
212 |
virtual TBool DestroyObject(MVgContext& aVgContext);
|
|
213 |
|
|
214 |
TInt ChildCount() const;
|
|
215 |
CVgImageInfo* Parent() const;
|
|
216 |
VGbitfield AllowedQuality() const;
|
|
217 |
TBool IsEglSibling() const;
|
|
218 |
TUint64 SgImageId() const;
|
|
219 |
EGLImageKHR EglImage() const;
|
|
220 |
|
|
221 |
static TInt BitsPerPixelForVgImageFormat(VGImageFormat aFormat);
|
|
222 |
static void PixmapBlit(TUint8* aDest, const TUint8* aSource, TInt aDestStride, TInt aSourceStride, TInt aRowCount,
|
|
223 |
size_t aRowLength, TInt aLastBits=0);
|
|
224 |
|
|
225 |
virtual VGint GetParameterVectorSize(MVgContext& aVgContext, VGint aParamType);
|
|
226 |
virtual VGfloat GetParameterf(MVgContext& aVgContext, VGint aParamType);
|
|
227 |
virtual VGint GetParameteri(MVgContext& aVgContext, VGint aParamType);
|
|
228 |
|
|
229 |
void ClearImage(MVgContext& aVgContext, VGint aX, VGint aY, VGint aWidth, VGint aHeight);
|
|
230 |
void ImageSubData(MVgContext& aVgContext, const void * aData, VGint aDataStride, VGImageFormat aDataFormat, VGint aX, VGint aY,
|
|
231 |
VGint aWidth, VGint aHeight);
|
|
232 |
void GetImageSubData(MVgContext& aVgContext, void * aData, VGint aDataStride, VGImageFormat aDataFormat, VGint aX, VGint aY,
|
|
233 |
VGint aWidth, VGint aHeight);
|
|
234 |
void CopyImage(MVgContext& aVgContext, VGint aDx, VGint aDy, CVgImageInfo& aSrcImageInfo, VGint aSx, VGint aSy, VGint aWidth,
|
|
235 |
VGint aHeight, VGboolean aDither);
|
|
236 |
void DrawImage(MVgContext& aVgContext);
|
|
237 |
void SetPixels(MVgContext& aVgContext, VGint aDx, VGint aDy, VGint aSx, VGint aSy, VGint aWidth, VGint aHeight);
|
|
238 |
void GetPixels(MVgContext& aVgContext, VGint aDx, VGint aDy, VGint aSx, VGint aSy, VGint aWidth, VGint aHeight);
|
|
239 |
void ColorMatrix(MVgContext& aVgContext, CVgImageInfo& aSrcImageInfo, const VGfloat * aMatrix);
|
|
240 |
void Convolve(MVgContext& aVgContext, CVgImageInfo& aSrcImageInfo, VGint aKernelWidth, VGint aKernelHeight,
|
|
241 |
VGint aShiftX, VGint aShiftY, const VGshort * aKernel, VGfloat aScale, VGfloat aBias, VGTilingMode aTilingMode);
|
|
242 |
void SeparableConvolve(MVgContext& aVgContext, CVgImageInfo& aSrcImageInfo, VGint aKernelWidth, VGint aKernelHeight,
|
|
243 |
VGint aShiftX, VGint aShiftY, const VGshort * aKernelX, const VGshort * aKernelY,
|
|
244 |
VGfloat aScale, VGfloat aBias, VGTilingMode aTilingMode);
|
|
245 |
void GaussianBlur(MVgContext& aVgContext, CVgImageInfo& aSrcImageInfo, VGfloat aStdDeviationX, VGfloat aStdDeviationY, VGTilingMode aTilingMode);
|
|
246 |
void Lookup(MVgContext& aVgContext, CVgImageInfo& aSrcImageInfo, const VGubyte * aRedLUT, const VGubyte * aGreenLUT, const VGubyte * aBlueLUT,
|
|
247 |
const VGubyte * aAlphaLUT, VGboolean aOutputLinear, VGboolean aOutputPremultiplied);
|
|
248 |
void LookupSingle(MVgContext& aVgContext, CVgImageInfo& aSrcImageInfo, const VGuint * aLookupTable, VGImageChannel aSourceChannel,
|
|
249 |
VGboolean aOutputLinear, VGboolean aOutputPremultiplied);
|
|
250 |
|
|
251 |
private:
|
|
252 |
inline CVgImageInfo(VGImageFormat aFormat, VGint aWidth, VGint aHeight, CVgImageInfo* aParent, VGbitfield aAllowedQuality,
|
|
253 |
EGLImageKHR aEglImage, TUint64 aSgImageId);
|
|
254 |
inline ~CVgImageInfo();
|
|
255 |
inline void IncChildCount();
|
|
256 |
inline void DecChildCount();
|
|
257 |
void HostVgGetImageSubData(MVgContext& aVgContext, void* aPixmap, size_t aPixmapSize, VGint aHostDataStride,
|
|
258 |
VGImageFormat aDataFormat, VGint aX, VGint aY, VGint aWidth, VGint aHeight);
|
|
259 |
void HostVgImageSubData(MVgContext& aVgContext, const void* aPixmap, size_t aPixmapSize, VGint aHostDataStride,
|
|
260 |
VGImageFormat aDataFormat, VGint aX, VGint aY, VGint aWidth, VGint aHeight);
|
|
261 |
|
|
262 |
|
|
263 |
/* **** desireable: expand CVgImageInfo to include and use for validating for various appropriate:
|
|
264 |
(TBool iIsRenderTarget; - VgImage is a surface currently being rendered, blocks some operations)
|
|
265 |
(TUint iUsedAsPaintPattern; - non-zero stops use as a render target)
|
|
266 |
(TUint iUsedAsGlyph; - count of how many places the VgImage is being used as a font glyph)
|
|
267 |
*/
|
|
268 |
private:
|
|
269 |
VGImageFormat iFormat; // not const because this is not currently initialised at creation for EglImages
|
|
270 |
CVgImageInfo* const iParent; // immediate parent VgImage, NULL if not a child
|
|
271 |
VGbitfield const iAllowedQuality;
|
|
272 |
// EglImage / SgImage info ...
|
|
273 |
TBool const iIsEglSibling;
|
|
274 |
EGLImageKHR const iEglImage;
|
|
275 |
TUint64 const iSgImageId; // Set or copied from parent for Egl Sibling - used to prompt Cmd Scheduler to sync pbuffer & vgimage
|
|
276 |
// non-const state
|
|
277 |
TInt iChildCount; // count of direct child images
|
|
278 |
};
|
|
279 |
|
|
280 |
|
|
281 |
NONSHARABLE_CLASS(CVgFontInfo) : public CVgHandleBase
|
|
282 |
{
|
|
283 |
public:
|
|
284 |
static CVgFontInfo* New();
|
|
285 |
virtual TBool DestroyObject(MVgContext& aVgContext);
|
|
286 |
|
|
287 |
virtual VGint GetParameterVectorSize(MVgContext& aVgContext, VGint aParamType);
|
|
288 |
|
|
289 |
void SetGlyphToPath(MVgContext& aVgContext, VGuint aGlyphIndex, CVgPathInfo* aPathInfo, VGboolean aIsHinted,
|
|
290 |
const VGfloat aGlyphOrigin [2], const VGfloat aEscapement[2]);
|
|
291 |
void SetGlyphToImage(MVgContext& aVgContext, VGuint aGlyphIndex, CVgImageInfo* aImageInfo, const VGfloat aGlyphOrigin [2],
|
|
292 |
const VGfloat aEscapement[2]);
|
|
293 |
void ClearGlyph(MVgContext& aVgContext, VGuint aGlyphIndex);
|
|
294 |
void DrawGlyph(MVgContext& aVgContext, VGuint aGlyphIndex, VGbitfield aPaintModes, VGboolean aAllowAutoHinting);
|
|
295 |
void DrawGlyphs(MVgContext& aVgContext, VGint aGlyphCount, const VGuint * aGlyphIndices, const VGfloat * aAdjustmentsX,
|
|
296 |
const VGfloat * aAdjustmentsY, VGbitfield aPaintModes, VGboolean aAllowAutoHinting);
|
|
297 |
|
|
298 |
private:
|
|
299 |
inline CVgFontInfo();
|
|
300 |
inline ~CVgFontInfo();
|
|
301 |
};
|
|
302 |
|
|
303 |
|
|
304 |
NONSHARABLE_CLASS(CVgPaintInfo) : public CVgHandleBase
|
|
305 |
{
|
|
306 |
public:
|
|
307 |
static CVgPaintInfo* New();
|
|
308 |
virtual TBool DestroyObject(MVgContext& aVgContext);
|
|
309 |
|
|
310 |
virtual VGint GetParameterVectorSize(MVgContext& aVgContext, VGint aParamType);
|
|
311 |
virtual VGfloat GetParameterf(MVgContext& aVgContext, VGint aParamType);
|
|
312 |
virtual VGint GetParameteri(MVgContext& aVgContext, VGint aParamType);
|
|
313 |
virtual void GetParameterfv(MVgContext& aVgContext, VGint aParamType, VGint aCount, VGfloat * aValues);
|
|
314 |
virtual void GetParameteriv(MVgContext& aVgContext, VGint aParamType, VGint aCount, VGint * aValues);
|
|
315 |
|
|
316 |
virtual void SetParameterf(MVgContext& aVgContext, VGint aParamType, VGfloat aValue);
|
|
317 |
virtual void SetParameteri(MVgContext& aVgContext, VGint aParamType, VGint aValue);
|
|
318 |
virtual void SetParameterfv(MVgContext& aVgContext, VGint aParamType, VGint aCount, const VGfloat * aValues);
|
|
319 |
virtual void SetParameteriv(MVgContext& aVgContext, VGint aParamType, VGint aCount, const VGint * aValues);
|
|
320 |
|
|
321 |
static void ResetPaint(MVgContext& aVgContext);
|
|
322 |
void SetPaint(MVgContext& aVgContext, VGbitfield aPaintModes);
|
|
323 |
void SetColor(MVgContext& aVgContext, VGuint aRgba);
|
|
324 |
VGuint GetColor(MVgContext& aVgContext);
|
|
325 |
void PaintPattern(MVgContext& aVgContext, CVgImageInfo* aPatternInfo);
|
|
326 |
|
|
327 |
private:
|
|
328 |
inline CVgPaintInfo();
|
|
329 |
inline ~CVgPaintInfo();
|
|
330 |
|
|
331 |
private:
|
|
332 |
// cached parameters
|
|
333 |
VGPaintType iPaintType;
|
|
334 |
VGColorRampSpreadMode iColorRampSpreadMode;
|
|
335 |
VGboolean iColorRampPremultiplied;
|
|
336 |
VGTilingMode iPatternTilingMode;
|
|
337 |
// VGfloat vector parameters are not currently cached in client
|
|
338 |
};
|
|
339 |
|
|
340 |
|
|
341 |
NONSHARABLE_CLASS(CVgPathInfo) : public CVgHandleBase
|
|
342 |
{
|
|
343 |
public:
|
|
344 |
static CVgPathInfo* CVgPathInfo::New(VGPathDatatype aDatatype, VGfloat aScale, VGfloat aBias, VGbitfield aCapabilities);
|
|
345 |
virtual TBool DestroyObject(MVgContext& aVgContext);
|
|
346 |
|
|
347 |
void ClearPath(MVgContext& aVgContext, VGbitfield aCapabilities);
|
|
348 |
void RemovePathCapabilities(MVgContext& aVgContext, VGbitfield aCapabilities);
|
|
349 |
VGbitfield GetPathCapabilities(MVgContext& aVgContext);
|
|
350 |
|
|
351 |
void AppendPath(MVgContext& aVgContext, CVgPathInfo& aSrcPathInfo);
|
|
352 |
void AppendPathData(MVgContext& aVgContext, VGint aNumSegments, const VGubyte * aPathSegments, const void* aPathData);
|
|
353 |
void ModifyPathCoords(MVgContext& aVgContext, VGint aStartIndex, VGint aNumSegments, const void* aPathData);
|
|
354 |
void TransformPath(MVgContext& aVgContext, CVgPathInfo& aSrcPathInfo);
|
|
355 |
VGboolean InterpolatePath(MVgContext& aVgContext, CVgPathInfo& aStartPathInfo, CVgPathInfo& aEndPathInfo, VGfloat aAmount);
|
|
356 |
VGfloat PathLength(MVgContext& aVgContext, VGint aStartSegment, VGint aNumSegments);
|
|
357 |
void PointAlongPath(MVgContext& aVgContext, VGint aStartSegment, VGint aNumSegments, VGfloat aDistance,
|
|
358 |
VGfloat* aX, VGfloat* aY, VGfloat* aTangentX, VGfloat* aTangentY);
|
|
359 |
void PathBounds(MVgContext& aVgContext, VGfloat* aMinX, VGfloat* aMinY, VGfloat* aWidth, VGfloat* aHeight);
|
|
360 |
void PathTransformedBounds(MVgContext& aVgContext, VGfloat* aMinX, VGfloat* aMinY, VGfloat* aWidth, VGfloat* aHeight);
|
|
361 |
void DrawPath(MVgContext& aVgContext, VGbitfield aPaintModes);
|
|
362 |
void RenderToMask(MVgContext& aVgContext, VGbitfield aPaintModes, VGMaskOperation aOperation);
|
|
363 |
|
|
364 |
inline VGPathDatatype PathDatatype() const;
|
|
365 |
|
|
366 |
TBool CheckHasPathCapabilities(MVgContext& aVgContext, VGbitfield aCapabilities);
|
|
367 |
|
|
368 |
virtual VGint GetParameterVectorSize(MVgContext& aVgContext, VGint aParamType);
|
|
369 |
virtual VGfloat GetParameterf(MVgContext& aVgContext, VGint aParamType);
|
|
370 |
virtual VGint GetParameteri(MVgContext& aVgContext, VGint aParamType);
|
|
371 |
|
|
372 |
private:
|
|
373 |
inline CVgPathInfo(VGPathDatatype aPathDatatype, VGfloat aScale, VGfloat aBias, VGbitfield aCapabilities);
|
|
374 |
inline ~CVgPathInfo();
|
|
375 |
TBool CheckAppendPathData(MVgContext& aVgContext, VGint aNumSegments, const VGubyte* aPathSegments, const void* aPathData,
|
|
376 |
VGint* aPathDataSize);
|
|
377 |
TBool CheckPathDataAlignment(MVgContext& aVgContext, const void* aPathData);
|
|
378 |
TBool CheckPathDataSize(MVgContext& aVgContext, const VGubyte* aPathSegments, VGint aNumSegments, VGint* aPathDataSize);
|
|
379 |
VGint HostVgeGetPathCoordsSizeInBytes(MVgContext& aVgContext, VGint aStartIndex, VGint aNumSegments);
|
|
380 |
|
|
381 |
private:
|
|
382 |
VGPathDatatype const iDatatype;
|
|
383 |
VGfloat const iScale;
|
|
384 |
VGfloat const iBias;
|
|
385 |
VGbitfield iCapabilities;
|
|
386 |
};
|
|
387 |
|
|
388 |
|
|
389 |
// Collection of static parameter checking functions - all "Chk" functions set the appropriate last VG Error on failure
|
|
390 |
class TCheck
|
|
391 |
{
|
|
392 |
public:
|
|
393 |
inline static TBool Chk16bitPtr(MVgContext& aVgContext, const void* aDataPtr);
|
|
394 |
inline static TBool Chk2x16bitPtr(MVgContext& aVgContext, const void* aDataPtr1, const void* aDataPtr2);
|
|
395 |
inline static TBool Chk32bitPtr(MVgContext& aVgContext, const void* aDataPtr);
|
|
396 |
inline static TBool Chk2x32bitPtr(MVgContext& aVgContext, const void* aDataPtr1, const void* aDataPtr2);
|
|
397 |
inline static TBool Chk4x32bitPtr(MVgContext& aVgContext, const void* aDataPtr1, const void* aDataPtr2, const void* aDataPtr3, const void* aDataPtr4);
|
|
398 |
inline static TBool Chk2xOptional32bitPtr(MVgContext& aVgContext, const void* aDataPtr1, const void* aDataPtr2);
|
|
399 |
inline static TBool ChkVGMaskOperation(MVgContext& aVgContext, VGMaskOperation aOperation);
|
|
400 |
inline static TBool ChkVGPaintMode(MVgContext& aVgContext, VGPaintMode aPaintMode);
|
|
401 |
inline static TBool ChkVGPathDataType(MVgContext& aVgContext, VGPathDatatype aDatatype);
|
|
402 |
inline static TBool ChkVGTilingMode(MVgContext& aVgContext, VGTilingMode aTilingMode);
|
|
403 |
inline static TBool ChkVgImageFormat(MVgContext& aVgContext, VGImageFormat aFormat);
|
|
404 |
inline static TBool ChkImageAlignment(MVgContext& aVgContext, VGImageFormat aImageFormat, const void* aData);
|
|
405 |
inline static TBool ChkPositiveImageSize(MVgContext& aVgContext, VGint aWidth, VGint aHeight);
|
|
406 |
inline static TBool ChkNewImageSize(MVgContext& aVgContext, VGint aWidth, VGint aHeight);
|
|
407 |
inline static TBool ChkVGPaintModesCombination(MVgContext& aVgContext, VGbitfield aPaintModes);
|
|
408 |
inline static TBool ChkVGPathFormat(MVgContext& aVgContext, VGint aPathFormat);
|
|
409 |
static TBool ChkAreaIsWithinImage(MVgContext& aVgContext, CVgImageBase* aImageInfo, VGint aX, VGint aY, VGint aWidth, VGint aHeight);
|
|
410 |
static TBool ChkParamCountAndValuesPtr(MVgContext& aVgContext, VGint aCount, const void* aValues);
|
|
411 |
static VGint ImageFormatByteDepth(VGImageFormat aImageFormat);
|
|
412 |
};
|
|
413 |
|
|
414 |
|
|
415 |
/*
|
|
416 |
Class holds mutex for Open VG client side state on construction, & releases it on destruction.
|
|
417 |
|
|
418 |
Placing methods here ensures the procedural requirement that the Mutex is held before these methods are called.
|
|
419 |
*/
|
|
420 |
class TCleanupVgLocks
|
|
421 |
{
|
|
422 |
public:
|
|
423 |
// having functions here forces the caller to hold the Open VG Mutex before they are called (when the lock object is constructed)
|
|
424 |
TCleanupVgLocks(MVgContext& aVgContext);
|
|
425 |
~TCleanupVgLocks();
|
|
426 |
void WaitForMutex(RMutex& aMutex);
|
|
427 |
void SignalMutex();
|
|
428 |
|
|
429 |
inline TBool CheckVGFont(VGFont aFont, CVgFontInfo** aFontInfo);
|
|
430 |
inline TBool CheckVGImage(VGImage aImage, CVgImageInfo** aImageInfo);
|
|
431 |
inline TBool CheckOptionalVGImage(VGImage aImage, CVgImageInfo** aImageInfo);
|
|
432 |
inline TBool Check2VGImages(VGImage aImage1, CVgImageInfo** aImageInfo1, VGImage aImage2, CVgImageInfo** aImageInfo2);
|
|
433 |
inline TBool CheckVGMaskLayer(VGMaskLayer aMaskLayer, CVgMaskLayerInfo** aHandleInfo);
|
|
434 |
inline TBool CheckVGPaint(VGPaint aPaint, CVgPaintInfo** aPaintInfo);
|
|
435 |
inline TBool CheckOptionalVGPaint(VGPaint aPaint, CVgPaintInfo** aPaintInfo);
|
|
436 |
// ToDo maybe add a version that checks Start Segment & Segment Count
|
|
437 |
inline TBool CheckVGPath(VGPath aPath, CVgPathInfo** aPathInfo, VGbitfield aReqdCapabilities=0);
|
|
438 |
inline TBool CheckOptionalVGPath(VGPath aPath, CVgPathInfo** aPathInfo);
|
|
439 |
inline TBool CheckVGAnyHandle(VGHandle aHandle, CVgHandleBase** aHandleInfo);
|
|
440 |
TBool CheckVGMaskOperationAndHandle(VGMaskOperation aOperation, VGHandle aMask, CVgImageBase** aImageInfo);
|
|
441 |
inline TBool CheckKernelWidthAndHeight(VGint aKernelWidth, VGint aKernelHeight, VGParamType aLimitType);
|
|
442 |
|
|
443 |
VGFont CreateFont(VGint aGlyphCapacityHint);
|
|
444 |
VGImage ChildImage(CVgImageInfo& aParentInfo, VGint aX, VGint aY, VGint aWidth, VGint aHeight);
|
|
445 |
VGImage CreateImage(VGImageFormat aFormat, VGint aWidth, VGint aHeight, VGbitfield aAllowedQuality);
|
|
446 |
VGMaskLayer CreateMaskLayer(VGint aWidth, VGint aHeight);
|
|
447 |
VGPaint CreatePaint();
|
|
448 |
VGPaint GetPaint(VGPaintMode aPaintMode);
|
|
449 |
VGPath CreatePath(VGint aPathFormat, VGPathDatatype aDatatype, VGfloat aScale, VGfloat aBias,
|
|
450 |
VGint aSegmentCapacityHint, VGint aCoordCapacityHint, VGbitfield aCapabilities);
|
|
451 |
VGImage CreateEGLImageTargetKHR(VGeglImageKHR aImage);
|
|
452 |
|
|
453 |
private:
|
|
454 |
MVgContext& const iVgContext;
|
|
455 |
RMutex& iMutex;
|
|
456 |
TBool iIsHeld;
|
|
457 |
};
|
|
458 |
|
|
459 |
|
|
460 |
|
|
461 |
// per VG client state
|
|
462 |
NONSHARABLE_CLASS(XOpenVgState) : public MEglManagementApi, public MVgApiForEgl
|
|
463 |
{
|
|
464 |
friend class TCleanupVgLocks;
|
|
465 |
public:
|
|
466 |
XOpenVgState();
|
|
467 |
~XOpenVgState();
|
|
468 |
|
|
469 |
// functions using/maintaining Open Vg Handle Map
|
|
470 |
TBool AddToHashMap(MVgContext& aVgContext, CVgHandleBase* aHandleInfo, VGHandle aHostHandle);
|
|
471 |
void UnMapHandle(TUint32 aClientHandle);
|
|
472 |
|
|
473 |
// MEglManagementApi - redirects via CVghwUtils to the EGL implementation
|
|
474 |
virtual TBool EglImageOpenForVgImage(EGLImageKHR aImage, TSize& aSize, VGHandle& aVgHandle, TUint64& aSgImageId);
|
|
475 |
virtual void EglImageClose(EGLImageKHR aImage);
|
|
476 |
|
|
477 |
// MVgApiForEgl - exported via CvghwUtils to the Guest EGL implementation
|
|
478 |
virtual ExtensionProcPointer guestGetVgProcAddress (const char *aProcName);
|
|
479 |
|
|
480 |
protected: // fns only visible to TVgLockHolder class
|
|
481 |
inline RMutex& MutexWait();
|
|
482 |
TBool CheckVGHandle(MVgContext& aVgContext, VGHandle aHandle, CVgHandleBase** aHandleInfo, TVgHandleType aMatchType);
|
|
483 |
// functions using cached values from Host Open VG implementation
|
|
484 |
TBool CheckKernelWidthAndHeight(MVgContext& aVgContext, VGint aKernelWidth, VGint aKernelHeight, VGParamType aLimitType);
|
|
485 |
|
|
486 |
private:
|
|
487 |
RMutex iStateLock;
|
|
488 |
|
|
489 |
// Map holds info about VG Handle based objects
|
|
490 |
RMutex iMapLock;
|
|
491 |
RHashMap<TUint, CVgHandleBase*> iHandleHashMap;
|
|
492 |
MEglManagementApi* iEglManagementApi;
|
|
493 |
|
|
494 |
// 'constants' initialised from x86 VG implementation the first time they are required
|
|
495 |
VGint iKVgMaxKernelSize;
|
|
496 |
VGint iKVgMaxSeparableKernelSize;
|
|
497 |
// ToDo: more values to cache: VG_MAX_IMAGE_WIDTH, VG_MAX_IMAGE_HEIGHT, VG_MAX_IMAGE_PIXELS
|
|
498 |
|
|
499 |
// ToDo Record when VG fonts use glyphs based on SgImages, required for Ref counting
|
|
500 |
};
|
|
501 |
|
|
502 |
|
|
503 |
|
|
504 |
|
|
505 |
// class of static methods to implement Open VG APIs
|
|
506 |
class TGuestOpenVg
|
|
507 |
{
|
|
508 |
public:
|
|
509 |
// VG APIs
|
|
510 |
static VGPaint vgGetPaint(VGPaintMode aPaintMode);
|
|
511 |
static VGPaint vgCreatePaint();
|
|
512 |
static VGboolean vgInterpolatePath(VGPath aDstPath, VGPath aStartPath, VGPath aEndPath, VGfloat aAmount);
|
|
513 |
static VGfloat vgPathLength(VGPath aPath, VGint aStartSegment, VGint aNumSegments);
|
|
514 |
static VGbitfield vgGetPathCapabilities(VGPath aPath);
|
|
515 |
static VGPath vgCreatePath(VGint aPathFormat, VGPathDatatype aDatatype, VGfloat aScale, VGfloat aBias,
|
|
516 |
VGint aSegmentCapacityHint, VGint aCoordCapacityHint, VGbitfield aCapabilities);
|
|
517 |
static VGfloat vgGetf(VGParamType aType);
|
|
518 |
static VGint vgGeti(VGParamType aType);
|
|
519 |
static VGfloat vgGetParameterf(VGHandle aObject, VGint aParamType);
|
|
520 |
static VGint vgGetParameteri(VGHandle aObject, VGint aParamType);
|
|
521 |
static VGint vgGetParameterVectorSize(VGHandle aObject, VGint aParamType);
|
|
522 |
static VGMaskLayer vgCreateMaskLayer(VGint aWidth, VGint aHeight);
|
|
523 |
static VGuint vgGetColor(VGPaint aPaint);
|
|
524 |
static VGImage vgCreateImage(VGImageFormat aFormat, VGint aWidth, VGint aHeight, VGbitfield aAllowedQuality);
|
|
525 |
static VGImage vgChildImage(VGImage aParent, VGint aX, VGint aY, VGint aWidth, VGint aHeight);
|
|
526 |
static VGImage vgGetParent(VGImage aImage);
|
|
527 |
static VGImage vgCreateEGLImageTargetKHR(VGeglImageKHR aImage);
|
|
528 |
static VGFont vgCreateFont(VGint aGlyphCapacityHint);
|
|
529 |
static VGHardwareQueryResult vgHardwareQuery(VGHardwareQueryType key, VGint setting);
|
|
530 |
static void vgGetParameterfv(VGHandle aObject, VGint aParamType, VGint aCount, VGfloat * aValues);
|
|
531 |
static void vgGetParameteriv(VGHandle aObject, VGint aParamType, VGint aCount, VGint * aValues);
|
|
532 |
static VGint vgGetVectorSize(VGParamType type);
|
|
533 |
static void vgGetfv(VGParamType aType, VGint aCount, const VGfloat * aValues);
|
|
534 |
static void vgGetiv(VGParamType aType, VGint aCount, const VGint * aValues);
|
|
535 |
static void vgGetMatrix(VGfloat* aM);
|
|
536 |
static void vgGetImageSubData(VGImage aImage, void* aData, VGint aDataStride, VGImageFormat aDataFormat,
|
|
537 |
VGint aX, VGint aY, VGint aWidth, VGint aHeight);
|
|
538 |
static void vgReadPixels(void* aData, VGint aDataStride, VGImageFormat aDataFormat, VGint aSx, VGint aSy,
|
|
539 |
VGint aWidth, VGint aHeight);
|
|
540 |
static void vgPathBounds(VGPath aPath, VGfloat* aMinX, VGfloat* aMinY, VGfloat* aWidth, VGfloat* aHeight);
|
|
541 |
static void vgPathTransformedBounds(VGPath aPath, VGfloat* aMinX, VGfloat* aMinY, VGfloat* aWidth, VGfloat* aHeight);
|
|
542 |
static void vgSetf(VGParamType aType, VGfloat aValue);
|
|
543 |
static void vgSeti(VGParamType aType, VGint aVvalue);
|
|
544 |
static void vgSetfv(VGParamType aType, VGint aCount, const VGfloat * aValues);
|
|
545 |
static void vgSetiv(VGParamType aType, VGint aCount, const VGint * aValues);
|
|
546 |
static void vgSetParameterf(VGHandle aObject, VGint aParamType, VGfloat aValue);
|
|
547 |
static void vgSetParameteri(VGHandle aObject, VGint aParamType, VGint aValue);
|
|
548 |
static void vgSetParameterfv(VGHandle aObject, VGint aParamType, VGint aCount, const VGfloat * aValues);
|
|
549 |
static void vgSetParameteriv(VGHandle aObject, VGint aParamType, VGint aCount, const VGint * aValues);
|
|
550 |
static void vgLoadIdentity();
|
|
551 |
static void vgLoadMatrix(const VGfloat* aM);
|
|
552 |
static void vgMultMatrix(const VGfloat* aM);
|
|
553 |
static void vgTranslate(VGfloat aTx, VGfloat aTy);
|
|
554 |
static void vgScale(VGfloat aSx, VGfloat aSy);
|
|
555 |
static void vgShear(VGfloat aShx, VGfloat aShy);
|
|
556 |
static void vgRotate(VGfloat aAngle);
|
|
557 |
static void vgMask(VGHandle aMask, VGMaskOperation aOperation, VGint aX, VGint aY, VGint aWidth, VGint aHeight);
|
|
558 |
static void vgRenderToMask(VGPath aPath, VGbitfield aPaintModes, VGMaskOperation aOperation);
|
|
559 |
static void vgDestroyMaskLayer(VGMaskLayer maskLayer);
|
|
560 |
static void vgFillMaskLayer(VGMaskLayer aMaskLayer, VGint aX, VGint aY, VGint aWidth, VGint aHeight, VGfloat aValue);
|
|
561 |
static void vgCopyMask(VGMaskLayer aMaskLayer, VGint aSx, VGint aSy, VGint aDx, VGint aDy, VGint aWidth, VGint aHeight);
|
|
562 |
static void vgClear(VGint aX, VGint aY, VGint aWidth, VGint aHeight);
|
|
563 |
static void vgClearPath(VGPath aPath, VGbitfield aCapabilities);
|
|
564 |
static void vgDestroyPath(VGPath aPath);
|
|
565 |
static void vgRemovePathCapabilities(VGPath aPath, VGbitfield aCapabilities);
|
|
566 |
static void vgAppendPath(VGPath aDstPath, VGPath aSrcPath);
|
|
567 |
static void vgAppendPathData(VGPath aDstPath, VGint aNumSegments, const VGubyte* aPathSegments, const void* aPathData);
|
|
568 |
static void vgModifyPathCoords(VGPath aDstPath, VGint aStartIndex, VGint aNumSegments, const void* aPathData);
|
|
569 |
static void vgTransformPath(VGPath aDstPath, VGPath aSrcPath);
|
|
570 |
static void vgPointAlongPath(VGPath aPath, VGint aStartSegment, VGint aNumSegments, VGfloat aDistance,
|
|
571 |
VGfloat* aX, VGfloat* aY, VGfloat* aTangentX, VGfloat* aTangentY);
|
|
572 |
static void vgDrawPath(VGPath aPath, VGbitfield aPaintModes);
|
|
573 |
static void vgDestroyPaint(VGPaint aPaint);
|
|
574 |
static void vgSetPaint(VGPaint aPaint, VGbitfield aPaintModes);
|
|
575 |
static void vgSetColor(VGPaint aPaint, VGuint aRgba);
|
|
576 |
static void vgPaintPattern(VGPaint aPaint, VGImage aPattern);
|
|
577 |
static void vgDestroyImage(VGImage aImage);
|
|
578 |
static void vgClearImage(VGImage aImage, VGint aX, VGint aY, VGint aWidth, VGint aHeight);
|
|
579 |
static void vgImageSubData(VGImage aImage, const void* aData, VGint aDataStride, VGImageFormat aDataFormat,
|
|
580 |
VGint aX, VGint aY, VGint aWidth, VGint aHeight);
|
|
581 |
static void vgCopyImage(VGImage aDst, VGint aDx, VGint aDy, VGImage aSrc, VGint aSx, VGint aSy, VGint aWidth, VGint aHeight,
|
|
582 |
VGboolean aDither);
|
|
583 |
static void vgDrawImage(VGImage aImage);
|
|
584 |
static void vgSetPixels(VGint aDx, VGint aDy, VGImage aSrc, VGint aSx, VGint aSy, VGint aWidth, VGint aHeight);
|
|
585 |
static void vgWritePixels(const void* data, VGint aDataStride, VGImageFormat aDataFormat, VGint aDx, VGint aDy,
|
|
586 |
VGint aWidth, VGint aHeight);
|
|
587 |
static void vgGetPixels(VGImage aDst, VGint aDx, VGint aDy, VGint aSx, VGint aSy, VGint aWidth, VGint aHeight);
|
|
588 |
static void vgCopyPixels(VGint aDx, VGint aDy, VGint aSx, VGint aSy, VGint aWidth, VGint aHeight);
|
|
589 |
static void vgDestroyFont(VGFont aFont);
|
|
590 |
static void vgSetGlyphToPath(VGFont aFont, VGuint aGlyphIndex, VGPath aPath, VGboolean aIsHinted, const VGfloat aGlyphOrigin [2],
|
|
591 |
const VGfloat aEscapement[2]);
|
|
592 |
static void vgSetGlyphToImage(VGFont aFont, VGuint aGlyphIndex, VGImage aImage, const VGfloat aGlyphOrigin [2],
|
|
593 |
const VGfloat aEscapement[2]);
|
|
594 |
static void vgClearGlyph(VGFont aFont, VGuint aGlyphIndex);
|
|
595 |
static void vgDrawGlyph(VGFont aFont, VGuint aGlyphIndex, VGbitfield aPaintModes, VGboolean aAllowAutoHinting);
|
|
596 |
static void vgDrawGlyphs(VGFont aFont, VGint aGlyphCount, const VGuint* aGlyphIndices, const VGfloat* aAdjustmentsX,
|
|
597 |
const VGfloat* aAdjustmentsY, VGbitfield aPaintModes, VGboolean aAllowAutoHinting);
|
|
598 |
static void vgColorMatrix(VGImage aDst, VGImage aSrc, const VGfloat* aMatrix);
|
|
599 |
static void vgConvolve(VGImage aDst, VGImage aSrc, VGint aKernelWidth, VGint aKernelHeight, VGint aShiftX, VGint aShiftY,
|
|
600 |
const VGshort* aKernel, VGfloat aScale, VGfloat aBias, VGTilingMode aTilingMode);
|
|
601 |
static void vgSeparableConvolve(VGImage aDst, VGImage aSrc, VGint aKernelWidth, VGint aKernelHeight, VGint aShiftX, VGint aShiftY,
|
|
602 |
const VGshort* aKernelX, const VGshort* aKernelY, VGfloat aScale, VGfloat aBias, VGTilingMode aTilingMode);
|
|
603 |
static void vgGaussianBlur(VGImage aDst, VGImage aSrc, VGfloat aStdDeviationX, VGfloat aStdDeviationY, VGTilingMode aTilingMode);
|
|
604 |
static void vgLookup(VGImage aDst, VGImage aSrc, const VGubyte* aRedLUT, const VGubyte* aGreenLUT, const VGubyte* aBlueLUT,
|
|
605 |
const VGubyte* aAlphaLUT, VGboolean aOutputLinear, VGboolean aOutputPremultiplied);
|
|
606 |
static void vgLookupSingle(VGImage aDst, VGImage aSrc, const VGuint* aLookupTable, VGImageChannel aSourceChannel,
|
|
607 |
VGboolean aOutputLinear, VGboolean aOutputPremultiplied);
|
|
608 |
|
|
609 |
private:
|
|
610 |
// fns that directly talk to Host Open VG (no parameter checking)
|
|
611 |
static void HostVgReadPixels(MVgContext& aVgContext, void* aPixmap, size_t aPixmapSize, VGint aHostDataStride,
|
|
612 |
VGImageFormat aDataFormat, VGint aSx, VGint aSy, VGint aWidth, VGint aHeight);
|
|
613 |
static void HostVgWritePixels(MVgContext& aVgContext, const void* aPixmap, size_t aPixmapSize, VGint aHostDataStride,
|
|
614 |
VGImageFormat aDataFormat, VGint aDx, VGint aDy, VGint aWidth, VGint aHeight);
|
|
615 |
|
|
616 |
static VGint HostGetVectorSize(MVgContext& aVgContext, VGParamType aType);
|
|
617 |
|
|
618 |
public: // ToDo find a more elegant way of calling this from XOpenVgState
|
|
619 |
static VGint HostGeti(MVgContext& aVgContext, VGParamType type);
|
|
620 |
private:
|
|
621 |
static inline VGfloat HostGetf(MVgContext& aVgContext, VGParamType type);
|
|
622 |
};
|
|
623 |
|
|
624 |
|
|
625 |
// C api extensions
|
|
626 |
#ifdef __cplusplus
|
|
627 |
extern "C" {
|
|
628 |
#endif
|
|
629 |
|
|
630 |
VGImage vgCreateEGLImageTargetKHR(VGeglImageKHR image);
|
|
631 |
|
|
632 |
#ifdef __cplusplus
|
|
633 |
}
|
|
634 |
#endif
|
|
635 |
|
|
636 |
|
|
637 |
#include "openvg.inl"
|
|
638 |
|
|
639 |
#endif // VGSTATE_H
|