case EGL_LARGEST_PBUFFER:\r
if(eglSurface->isPBufferSurface()) // For a window or pixmap surface, the contents of *value are not modified.\r
{\r
- *value = eglSurface->getLargestPBuffer(); \r
+ *value = eglSurface->getLargestPBuffer();\r
}\r
break;\r
case EGL_MIPMAP_TEXTURE:\r
return error(EGL_BAD_ATTRIBUTE, EGL_NO_IMAGE_KHR);\r
}\r
\r
- return new AndroidNativeImage(nativeBuffer);\r
+ return success(new AndroidNativeImage(nativeBuffer));\r
}\r
#endif\r
\r
return error(EGL_BAD_MATCH, EGL_NO_SYNC_KHR);\r
}\r
\r
- return new FenceSync(context);\r
+ return success(new FenceSync(context));\r
}\r
\r
EGLBoolean DestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)\r
\r
delete eglSync;\r
\r
- return EGL_TRUE;\r
+ return success(EGL_TRUE);\r
}\r
\r
EGLint ClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)\r
eglSync->wait();\r
}\r
\r
- return EGL_CONDITION_SATISFIED_KHR;\r
+ return success(EGL_CONDITION_SATISFIED_KHR);\r
}\r
\r
EGLBoolean GetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value)\r
{\r
case EGL_SYNC_TYPE_KHR:\r
*value = EGL_SYNC_FENCE_KHR;\r
- return EGL_TRUE;\r
+ return success(EGL_TRUE);\r
case EGL_SYNC_STATUS_KHR:\r
eglSync->wait(); // TODO: Don't block. Just poll based on sw::Query.\r
*value = eglSync->isSignaled() ? EGL_SIGNALED_KHR : EGL_UNSIGNALED_KHR;\r
- return EGL_TRUE;\r
+ return success(EGL_TRUE);\r
case EGL_SYNC_CONDITION_KHR:\r
*value = EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR;\r
- return EGL_TRUE;\r
+ return success(EGL_TRUE);\r
default:\r
return error(EGL_BAD_ATTRIBUTE, EGL_FALSE);\r
}\r
{\r
if(strcmp(procname, eglExtensions[ext].name) == 0)\r
{\r
- return (__eglMustCastToProperFunctionPointerType)eglExtensions[ext].address;\r
+ return success((__eglMustCastToProperFunctionPointerType)eglExtensions[ext].address);\r
}\r
}\r
\r
if(libGLESv2)\r
{\r
__eglMustCastToProperFunctionPointerType proc = libGLESv2->es2GetProcAddress(procname);\r
- if(proc) return proc;\r
+ if(proc) return success(proc);\r
}\r
\r
if(libGLES_CM)\r
{\r
__eglMustCastToProperFunctionPointerType proc = libGLES_CM->es1GetProcAddress(procname);\r
- if(proc) return proc;\r
+ if(proc) return success(proc);\r
}\r
\r
- return NULL;\r
+ return success((__eglMustCastToProperFunctionPointerType)NULL);\r
}\r
}\r