Qt 4.8
Static Public Functions | Static Private Functions | Static Private Attributes | List of all members
QMeeGoExtensions Class Reference

#include <qmeegoextensions.h>

Static Public Functions

static EGLint eglClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)
 
static EGLNativeSharedImageTypeNOK eglCreateSharedImageNOK (EGLDisplay dpy, EGLImageKHR image, EGLint *props)
 
static EGLSyncKHR eglCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
 
static bool eglDestroySharedImageNOK (EGLDisplay dpy, EGLNativeSharedImageTypeNOK img)
 
static bool eglDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync)
 
static EGLBoolean eglGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value)
 
static bool eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list)
 
static bool eglQueryImageNOK (EGLDisplay dpy, EGLImageKHR image, EGLint prop, EGLint *v)
 
static bool eglSetSurfaceScalingNOK (EGLDisplay dpy, EGLSurface surface, int x, int y, int width, int height)
 
static bool eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface)
 
static void ensureInitialized ()
 

Static Private Functions

static void initialize ()
 

Static Private Attributes

static bool hasFenceSync = false
 
static bool hasImageShared = false
 
static bool hasLockSurface = false
 
static bool hasSurfaceScaling = false
 
static bool initialized = false
 

Detailed Description

Definition at line 99 of file qmeegoextensions.h.

Functions

◆ eglClientWaitSyncKHR()

EGLint QMeeGoExtensions::eglClientWaitSyncKHR ( EGLDisplay  dpy,
EGLSyncKHR  sync,
EGLint  flags,
EGLTimeKHR  timeout 
)
static

Definition at line 150 of file qmeegoextensions.cpp.

Referenced by QMeeGoLivePixmapData::lock().

151 {
152  if (!hasFenceSync)
153  qFatal("EGL_KHR_fence_sync not found but trying to use capability!");
154 
155  return _eglClientWaitSyncKHR(dpy, sync, flags, timeout);
156 }
Q_CORE_EXPORT void qFatal(const char *,...)
static eglClientWaitSyncKHRFunc _eglClientWaitSyncKHR
static bool hasFenceSync

◆ eglCreateSharedImageNOK()

EGLNativeSharedImageTypeNOK QMeeGoExtensions::eglCreateSharedImageNOK ( EGLDisplay  dpy,
EGLImageKHR  image,
EGLint *  props 
)
static

Definition at line 86 of file qmeegoextensions.cpp.

Referenced by QMeeGoPixmapData::imageToEGLSharedImage().

87 {
88  if (!hasImageShared)
89  qFatal("EGL_NOK_image_shared not found but trying to use capability!");
90 
91  return _eglCreateSharedImageNOK(dpy, image, props);
92 }
static bool hasImageShared
static eglCreateSharedImageNOKFunc _eglCreateSharedImageNOK
Q_CORE_EXPORT void qFatal(const char *,...)

◆ eglCreateSyncKHR()

EGLSyncKHR QMeeGoExtensions::eglCreateSyncKHR ( EGLDisplay  dpy,
EGLenum  type,
const EGLint *  attrib_list 
)
static

Definition at line 134 of file qmeegoextensions.cpp.

Referenced by QMeeGoGraphicsSystem::createFenceSync().

135 {
136  if (!hasFenceSync)
137  qFatal("EGL_KHR_fence_sync not found but trying to use capability!");
138 
139  return _eglCreateSyncKHR(dpy, type, attrib_list);
140 }
int type
Definition: qmetatype.cpp:239
static eglCreateSyncKHRFunc _eglCreateSyncKHR
Q_CORE_EXPORT void qFatal(const char *,...)
static bool hasFenceSync

◆ eglDestroySharedImageNOK()

bool QMeeGoExtensions::eglDestroySharedImageNOK ( EGLDisplay  dpy,
EGLNativeSharedImageTypeNOK  img 
)
static

Definition at line 102 of file qmeegoextensions.cpp.

Referenced by QMeeGoPixmapData::destroyEGLSharedImage().

103 {
104  if (!hasImageShared)
105  qFatal("EGL_NOK_image_shared not found but trying to use capability!");
106 
107  return _eglDestroySharedImageNOK(dpy, img);
108 }
static bool hasImageShared
static eglDestroySharedImageNOKFunc _eglDestroySharedImageNOK
Q_CORE_EXPORT void qFatal(const char *,...)

◆ eglDestroySyncKHR()

bool QMeeGoExtensions::eglDestroySyncKHR ( EGLDisplay  dpy,
EGLSyncKHR  sync 
)
static

Definition at line 142 of file qmeegoextensions.cpp.

Referenced by QMeeGoGraphicsSystem::destroyFenceSync().

143 {
144  if (!hasFenceSync)
145  qFatal("EGL_KHR_fence_sync not found but trying to use capability!");
146 
147  return _eglDestroySyncKHR(dpy, sync);
148 }
static eglDestroySyncKHRFunc _eglDestroySyncKHR
Q_CORE_EXPORT void qFatal(const char *,...)
static bool hasFenceSync

◆ eglGetSyncAttribKHR()

EGLBoolean QMeeGoExtensions::eglGetSyncAttribKHR ( EGLDisplay  dpy,
EGLSyncKHR  sync,
EGLint  attribute,
EGLint *  value 
)
static

Definition at line 158 of file qmeegoextensions.cpp.

159 {
160  if (!hasFenceSync)
161  qFatal("EGL_KHR_fence_sync not found but trying to use capability!");
162 
163  return _eglGetSyncAttribKHR(dpy, sync, attribute, value);
164 }
Q_CORE_EXPORT void qFatal(const char *,...)
static eglGetSyncAttribKHRFunc _eglGetSyncAttribKHR
static bool hasFenceSync

◆ eglLockSurfaceKHR()

bool QMeeGoExtensions::eglLockSurfaceKHR ( EGLDisplay  display,
EGLSurface  surface,
const EGLint *  attrib_list 
)
static

Definition at line 118 of file qmeegoextensions.cpp.

Referenced by QMeeGoLivePixmapData::lock().

119 {
120  if (!hasLockSurface)
121  qFatal("EGL_KHR_lock_surface2 not found but trying to use capability!");
122 
123  return _eglLockSurfaceKHR(display, surface, attrib_list);
124 }
Q_GUI_EXPORT EGLDisplay display()
Definition: qegl.cpp:589
static bool hasLockSurface
Q_CORE_EXPORT void qFatal(const char *,...)
static eglLockSurfaceKHRFunc _eglLockSurfaceKHR

◆ eglQueryImageNOK()

bool QMeeGoExtensions::eglQueryImageNOK ( EGLDisplay  dpy,
EGLImageKHR  image,
EGLint  prop,
EGLint *  v 
)
static

Definition at line 94 of file qmeegoextensions.cpp.

Referenced by QMeeGoPixmapData::fromEGLSharedImage().

95 {
96  if (!hasImageShared)
97  qFatal("EGL_NOK_image_shared not found but trying to use capability!");
98 
99  return _eglQueryImageNOK(dpy, image, prop, v);
100 }
static bool hasImageShared
Q_CORE_EXPORT void qFatal(const char *,...)
static eglQueryImageNOKFunc _eglQueryImageNOK

◆ eglSetSurfaceScalingNOK()

bool QMeeGoExtensions::eglSetSurfaceScalingNOK ( EGLDisplay  dpy,
EGLSurface  surface,
int  x,
int  y,
int  width,
int  height 
)
static

Definition at line 110 of file qmeegoextensions.cpp.

Referenced by QMeeGoGraphicsSystem::setSurfaceScaling().

111 {
112  if (!hasSurfaceScaling)
113  qFatal("EGL_NOK_surface_scaling not found but trying to use capability!");
114 
115  return _eglSetSurfaceScalingNOK(dpy, surface, x, y, width, height);
116 }
static eglSetSurfaceScalingNOKFunc _eglSetSurfaceScalingNOK
Q_CORE_EXPORT void qFatal(const char *,...)
static bool hasSurfaceScaling

◆ eglUnlockSurfaceKHR()

bool QMeeGoExtensions::eglUnlockSurfaceKHR ( EGLDisplay  display,
EGLSurface  surface 
)
static

Definition at line 126 of file qmeegoextensions.cpp.

Referenced by QMeeGoLivePixmapData::lock(), and QMeeGoLivePixmapData::release().

127 {
128  if (!hasLockSurface)
129  qFatal("EGL_KHR_lock_surface2 not found but trying to use capability!");
130 
131  return _eglUnlockSurfaceKHR(display, surface);
132 }
static eglUnlockSurfaceKHRFunc _eglUnlockSurfaceKHR
Q_GUI_EXPORT EGLDisplay display()
Definition: qegl.cpp:589
static bool hasLockSurface
Q_CORE_EXPORT void qFatal(const char *,...)

◆ ensureInitialized()

void QMeeGoExtensions::ensureInitialized ( )
static

◆ initialize()

void QMeeGoExtensions::initialize ( )
staticprivate

Definition at line 168 of file qmeegoextensions.cpp.

Referenced by ensureInitialized().

169 {
172 
173  if (QEgl::hasExtension("EGL_NOK_image_shared")) {
174  qDebug("MeegoGraphics: found EGL_NOK_image_shared");
175  _eglQueryImageNOK = (eglQueryImageNOKFunc) eglGetProcAddress("eglQueryImageNOK");
176  _eglCreateSharedImageNOK = (eglCreateSharedImageNOKFunc) eglGetProcAddress("eglCreateSharedImageNOK");
177  _eglDestroySharedImageNOK = (eglDestroySharedImageNOKFunc) eglGetProcAddress("eglDestroySharedImageNOK");
178  _eglLockSurfaceKHR = (eglLockSurfaceKHRFunc) eglGetProcAddress("eglLockSurfaceKHR");
179  _eglUnlockSurfaceKHR = (eglUnlockSurfaceKHRFunc) eglGetProcAddress("eglUnlockSurfaceKHR");
180 
182  hasImageShared = true;
183  }
184 
185  if (QEgl::hasExtension("EGL_NOK_surface_scaling")) {
186  qDebug("MeegoGraphics: found EGL_NOK_surface_scaling");
187  _eglSetSurfaceScalingNOK = (eglSetSurfaceScalingNOKFunc) eglGetProcAddress("eglSetSurfaceScalingNOK");
188 
190  hasSurfaceScaling = true;
191  }
192 
193  if (QEgl::hasExtension("EGL_KHR_lock_surface2")) {
194  qDebug("MeegoGraphics: found EGL_KHR_lock_surface2");
195  _eglLockSurfaceKHR = (eglLockSurfaceKHRFunc) eglGetProcAddress("eglLockSurfaceKHR");
196  _eglUnlockSurfaceKHR = (eglUnlockSurfaceKHRFunc) eglGetProcAddress("eglUnlockSurfaceKHR");
197 
199  hasLockSurface = true;
200  }
201 
202  if (QEgl::hasExtension("EGL_KHR_fence_sync")) {
203  qDebug("MeegoGraphics: found EGL_KHR_fence_sync");
204  _eglCreateSyncKHR = (eglCreateSyncKHRFunc) eglGetProcAddress("eglCreateSyncKHR");
205  _eglDestroySyncKHR = (eglDestroySyncKHRFunc) eglGetProcAddress("eglDestroySyncKHR");
206  _eglClientWaitSyncKHR = (eglClientWaitSyncKHRFunc) eglGetProcAddress("eglClientWaitSyncKHR");
207  _eglGetSyncAttribKHR = (eglGetSyncAttribKHRFunc) eglGetProcAddress("eglGetSyncAttribKHR");
208 
210  hasFenceSync = true;
211  }
212 }
static bool hasImageShared
EGLBoolean(EGLAPIENTRY * eglGetSyncAttribKHRFunc)(EGLDisplay, EGLSyncKHR, EGLint, EGLint *)
EGLBoolean(EGLAPIENTRY * eglUnlockSurfaceKHRFunc)(EGLDisplay, EGLSurface)
static eglDestroySyncKHRFunc _eglDestroySyncKHR
static eglCreateSharedImageNOKFunc _eglCreateSharedImageNOK
static eglCreateSyncKHRFunc _eglCreateSyncKHR
static eglUnlockSurfaceKHRFunc _eglUnlockSurfaceKHR
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
static const QGLContext * currentContext()
Returns the current context, i.e.
Definition: qgl.cpp:3545
Q_CORE_EXPORT void qDebug(const char *,...)
The QGLContext class encapsulates an OpenGL rendering context.
Definition: qgl.h:310
EGLSyncKHR(EGLAPIENTRY * eglCreateSyncKHRFunc)(EGLDisplay, EGLenum, const EGLint *)
static bool hasLockSurface
static eglDestroySharedImageNOKFunc _eglDestroySharedImageNOK
Q_GUI_EXPORT bool hasExtension(const char *extensionName)
Definition: qegl.cpp:791
static eglSetSurfaceScalingNOKFunc _eglSetSurfaceScalingNOK
EGLBoolean(EGLAPIENTRY * eglSetSurfaceScalingNOKFunc)(EGLDisplay, EGLSurface, EGLint, EGLint, EGLint, EGLint)
EGLNativeSharedImageTypeNOK(EGLAPIENTRY * eglCreateSharedImageNOKFunc)(EGLDisplay, EGLImageKHR, EGLint *)
EGLBoolean(EGLAPIENTRY * eglLockSurfaceKHRFunc)(EGLDisplay, EGLSurface, const EGLint *)
static eglQueryImageNOKFunc _eglQueryImageNOK
EGLint(EGLAPIENTRY * eglClientWaitSyncKHRFunc)(EGLDisplay, EGLSyncKHR, EGLint, EGLTimeKHR)
static eglGetSyncAttribKHRFunc _eglGetSyncAttribKHR
static eglClientWaitSyncKHRFunc _eglClientWaitSyncKHR
#define ctx
Definition: qgl.cpp:6094
EGLBoolean(EGLAPIENTRY * eglQueryImageNOKFunc)(EGLDisplay, EGLImageKHR, EGLint, EGLint *)
bool qt_resolve_eglimage_gl_extensions(QGLContext *ctx)
static bool hasSurfaceScaling
static eglLockSurfaceKHRFunc _eglLockSurfaceKHR
EGLBoolean(EGLAPIENTRY * eglDestroySharedImageNOKFunc)(EGLDisplay, EGLNativeSharedImageTypeNOK)
static bool hasFenceSync
EGLBoolean(EGLAPIENTRY * eglDestroySyncKHRFunc)(EGLDisplay, EGLSyncKHR)

Properties

◆ hasFenceSync

bool QMeeGoExtensions::hasFenceSync = false
staticprivate

◆ hasImageShared

bool QMeeGoExtensions::hasImageShared = false
staticprivate

◆ hasLockSurface

bool QMeeGoExtensions::hasLockSurface = false
staticprivate

Definition at line 121 of file qmeegoextensions.h.

Referenced by eglLockSurfaceKHR(), eglUnlockSurfaceKHR(), and initialize().

◆ hasSurfaceScaling

bool QMeeGoExtensions::hasSurfaceScaling = false
staticprivate

Definition at line 120 of file qmeegoextensions.h.

Referenced by eglSetSurfaceScalingNOK(), and initialize().

◆ initialized

bool QMeeGoExtensions::initialized = false
staticprivate

Definition at line 118 of file qmeegoextensions.h.

Referenced by ensureInitialized().


The documentation for this class was generated from the following files: