| Index: gpu/gles2_conform_support/egl/egl.cc
|
| diff --git a/gpu/gles2_conform_support/egl/egl.cc b/gpu/gles2_conform_support/egl/egl.cc
|
| index e64285a02ea4f98b8ba16d281b6598989bf41d67..343937fa0f3d4eed3a0b25dfc7fc06b4871022a6 100644
|
| --- a/gpu/gles2_conform_support/egl/egl.cc
|
| +++ b/gpu/gles2_conform_support/egl/egl.cc
|
| @@ -85,18 +85,16 @@
|
| } // namespace
|
|
|
| extern "C" {
|
| -EGLAPI EGLint EGLAPIENTRY eglGetError() {
|
| +EGLint eglGetError() {
|
| // TODO(alokp): Fix me.
|
| return EGL_SUCCESS;
|
| }
|
|
|
| -EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id) {
|
| +EGLDisplay eglGetDisplay(EGLNativeDisplayType display_id) {
|
| return new egl::Display(display_id);
|
| }
|
|
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy,
|
| - EGLint* major,
|
| - EGLint* minor) {
|
| +EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) {
|
| if (dpy == EGL_NO_DISPLAY)
|
| return EglError(EGL_BAD_DISPLAY, EGL_FALSE);
|
|
|
| @@ -104,21 +102,19 @@
|
| if (!display->Initialize())
|
| return EglError(EGL_NOT_INITIALIZED, EGL_FALSE);
|
|
|
| - // eglInitialize can be called multiple times, prevent InitializeOneOff from
|
| - // being called multiple times.
|
| - if (gfx::GetGLImplementation() == gfx::kGLImplementationNone) {
|
| - int argc = 1;
|
| - const char* const argv[] = {"dummy"};
|
| - base::CommandLine::Init(argc, argv);
|
| - gfx::GLSurface::InitializeOneOff();
|
| - }
|
| + int argc = 1;
|
| + const char* const argv[] = {
|
| + "dummy"
|
| + };
|
| + base::CommandLine::Init(argc, argv);
|
| + gfx::GLSurface::InitializeOneOff();
|
|
|
| *major = 1;
|
| *minor = 4;
|
| return EglSuccess(EGL_TRUE);
|
| }
|
|
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy) {
|
| +EGLBoolean eglTerminate(EGLDisplay dpy) {
|
| EGLint error_code = ValidateDisplay(dpy);
|
| if (error_code != EGL_SUCCESS)
|
| return EglError(error_code, EGL_FALSE);
|
| @@ -129,7 +125,7 @@
|
| return EglSuccess(EGL_TRUE);
|
| }
|
|
|
| -EGLAPI const char* EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name) {
|
| +const char* eglQueryString(EGLDisplay dpy, EGLint name) {
|
| EGLint error_code = ValidateDisplay(dpy);
|
| if (error_code != EGL_SUCCESS)
|
| return EglError(error_code, static_cast<const char*>(NULL));
|
| @@ -148,11 +144,11 @@
|
| }
|
| }
|
|
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy,
|
| - const EGLint* attrib_list,
|
| - EGLConfig* configs,
|
| - EGLint config_size,
|
| - EGLint* num_config) {
|
| +EGLBoolean eglChooseConfig(EGLDisplay dpy,
|
| + const EGLint* attrib_list,
|
| + EGLConfig* configs,
|
| + EGLint config_size,
|
| + EGLint* num_config) {
|
| EGLint error_code = ValidateDisplay(dpy);
|
| if (error_code != EGL_SUCCESS)
|
| return EglError(error_code, EGL_FALSE);
|
| @@ -167,10 +163,10 @@
|
| return EglSuccess(EGL_TRUE);
|
| }
|
|
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy,
|
| - EGLConfig* configs,
|
| - EGLint config_size,
|
| - EGLint* num_config) {
|
| +EGLBoolean eglGetConfigs(EGLDisplay dpy,
|
| + EGLConfig* configs,
|
| + EGLint config_size,
|
| + EGLint* num_config) {
|
| EGLint error_code = ValidateDisplay(dpy);
|
| if (error_code != EGL_SUCCESS)
|
| return EglError(error_code, EGL_FALSE);
|
| @@ -185,10 +181,10 @@
|
| return EglSuccess(EGL_TRUE);
|
| }
|
|
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy,
|
| - EGLConfig config,
|
| - EGLint attribute,
|
| - EGLint* value) {
|
| +EGLBoolean eglGetConfigAttrib(EGLDisplay dpy,
|
| + EGLConfig config,
|
| + EGLint attribute,
|
| + EGLint* value) {
|
| EGLint error_code = ValidateDisplayConfig(dpy, config);
|
| if (error_code != EGL_SUCCESS)
|
| return EglError(error_code, EGL_FALSE);
|
| @@ -200,11 +196,10 @@
|
| return EglSuccess(EGL_TRUE);
|
| }
|
|
|
| -EGLAPI EGLSurface EGLAPIENTRY
|
| -eglCreateWindowSurface(EGLDisplay dpy,
|
| - EGLConfig config,
|
| - EGLNativeWindowType win,
|
| - const EGLint* attrib_list) {
|
| +EGLSurface eglCreateWindowSurface(EGLDisplay dpy,
|
| + EGLConfig config,
|
| + EGLNativeWindowType win,
|
| + const EGLint* attrib_list) {
|
| EGLint error_code = ValidateDisplayConfig(dpy, config);
|
| if (error_code != EGL_SUCCESS)
|
| return EglError(error_code, EGL_NO_SURFACE);
|
| @@ -220,10 +215,9 @@
|
| return EglSuccess(surface);
|
| }
|
|
|
| -EGLAPI EGLSurface EGLAPIENTRY
|
| -eglCreatePbufferSurface(EGLDisplay dpy,
|
| - EGLConfig config,
|
| - const EGLint* attrib_list) {
|
| +EGLSurface eglCreatePbufferSurface(EGLDisplay dpy,
|
| + EGLConfig config,
|
| + const EGLint* attrib_list) {
|
| EGLint error_code = ValidateDisplayConfig(dpy, config);
|
| if (error_code != EGL_SUCCESS)
|
| return EglError(error_code, EGL_NO_SURFACE);
|
| @@ -252,16 +246,15 @@
|
| return EglSuccess(surface);
|
| }
|
|
|
| -EGLAPI EGLSurface EGLAPIENTRY
|
| -eglCreatePixmapSurface(EGLDisplay dpy,
|
| - EGLConfig config,
|
| - EGLNativePixmapType pixmap,
|
| - const EGLint* attrib_list) {
|
| +EGLSurface eglCreatePixmapSurface(EGLDisplay dpy,
|
| + EGLConfig config,
|
| + EGLNativePixmapType pixmap,
|
| + const EGLint* attrib_list) {
|
| return EGL_NO_SURFACE;
|
| }
|
|
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy,
|
| - EGLSurface surface) {
|
| +EGLBoolean eglDestroySurface(EGLDisplay dpy,
|
| + EGLSurface surface) {
|
| EGLint error_code = ValidateDisplaySurface(dpy, surface);
|
| if (error_code != EGL_SUCCESS)
|
| return EglError(error_code, EGL_FALSE);
|
| @@ -271,65 +264,64 @@
|
| return EglSuccess(EGL_TRUE);
|
| }
|
|
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy,
|
| - EGLSurface surface,
|
| - EGLint attribute,
|
| - EGLint* value) {
|
| - return EGL_FALSE;
|
| -}
|
| -
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api) {
|
| - return EGL_FALSE;
|
| -}
|
| -
|
| -EGLAPI EGLenum EGLAPIENTRY eglQueryAPI() {
|
| +EGLBoolean eglQuerySurface(EGLDisplay dpy,
|
| + EGLSurface surface,
|
| + EGLint attribute,
|
| + EGLint* value) {
|
| + return EGL_FALSE;
|
| +}
|
| +
|
| +EGLBoolean eglBindAPI(EGLenum api) {
|
| + return EGL_FALSE;
|
| +}
|
| +
|
| +EGLenum eglQueryAPI() {
|
| return EGL_OPENGL_ES_API;
|
| }
|
|
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void) {
|
| - return EGL_FALSE;
|
| -}
|
| -
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void) {
|
| - return EGL_FALSE;
|
| -}
|
| -
|
| -EGLAPI EGLSurface EGLAPIENTRY
|
| -eglCreatePbufferFromClientBuffer(EGLDisplay dpy,
|
| - EGLenum buftype,
|
| - EGLClientBuffer buffer,
|
| - EGLConfig config,
|
| - const EGLint* attrib_list) {
|
| +EGLBoolean eglWaitClient(void) {
|
| + return EGL_FALSE;
|
| +}
|
| +
|
| +EGLBoolean eglReleaseThread(void) {
|
| + return EGL_FALSE;
|
| +}
|
| +
|
| +EGLSurface eglCreatePbufferFromClientBuffer(EGLDisplay dpy,
|
| + EGLenum buftype,
|
| + EGLClientBuffer buffer,
|
| + EGLConfig config,
|
| + const EGLint* attrib_list) {
|
| return EGL_NO_SURFACE;
|
| }
|
|
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy,
|
| - EGLSurface surface,
|
| - EGLint attribute,
|
| - EGLint value) {
|
| - return EGL_FALSE;
|
| -}
|
| -
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy,
|
| - EGLSurface surface,
|
| - EGLint buffer) {
|
| - return EGL_FALSE;
|
| -}
|
| -
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy,
|
| - EGLSurface surface,
|
| - EGLint buffer) {
|
| - return EGL_FALSE;
|
| -}
|
| -
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval) {
|
| - return EGL_FALSE;
|
| -}
|
| -
|
| -EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy,
|
| - EGLConfig config,
|
| - EGLContext share_context,
|
| - const EGLint* attrib_list) {
|
| +EGLBoolean eglSurfaceAttrib(EGLDisplay dpy,
|
| + EGLSurface surface,
|
| + EGLint attribute,
|
| + EGLint value) {
|
| + return EGL_FALSE;
|
| +}
|
| +
|
| +EGLBoolean eglBindTexImage(EGLDisplay dpy,
|
| + EGLSurface surface,
|
| + EGLint buffer) {
|
| + return EGL_FALSE;
|
| +}
|
| +
|
| +EGLBoolean eglReleaseTexImage(EGLDisplay dpy,
|
| + EGLSurface surface,
|
| + EGLint buffer) {
|
| + return EGL_FALSE;
|
| +}
|
| +
|
| +EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval) {
|
| + return EGL_FALSE;
|
| +}
|
| +
|
| +EGLContext eglCreateContext(EGLDisplay dpy,
|
| + EGLConfig config,
|
| + EGLContext share_context,
|
| + const EGLint* attrib_list) {
|
| EGLint error_code = ValidateDisplayConfig(dpy, config);
|
| if (error_code != EGL_SUCCESS)
|
| return EglError(error_code, EGL_NO_CONTEXT);
|
| @@ -349,8 +341,7 @@
|
| return EglSuccess(context);
|
| }
|
|
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy,
|
| - EGLContext ctx) {
|
| +EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx) {
|
| EGLint error_code = ValidateDisplayContext(dpy, ctx);
|
| if (error_code != EGL_SUCCESS)
|
| return EglError(error_code, EGL_FALSE);
|
| @@ -360,10 +351,10 @@
|
| return EGL_TRUE;
|
| }
|
|
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy,
|
| - EGLSurface draw,
|
| - EGLSurface read,
|
| - EGLContext ctx) {
|
| +EGLBoolean eglMakeCurrent(EGLDisplay dpy,
|
| + EGLSurface draw,
|
| + EGLSurface read,
|
| + EGLContext ctx) {
|
| if (ctx != EGL_NO_CONTEXT) {
|
| EGLint error_code = ValidateDisplaySurface(dpy, draw);
|
| if (error_code != EGL_SUCCESS)
|
| @@ -387,35 +378,34 @@
|
| return EGL_TRUE;
|
| }
|
|
|
| -EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext() {
|
| +EGLContext eglGetCurrentContext() {
|
| return EGL_NO_CONTEXT;
|
| }
|
|
|
| -EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw) {
|
| +EGLSurface eglGetCurrentSurface(EGLint readdraw) {
|
| return EGL_NO_SURFACE;
|
| }
|
|
|
| -EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay() {
|
| +EGLDisplay eglGetCurrentDisplay() {
|
| return EGL_NO_DISPLAY;
|
| }
|
|
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy,
|
| - EGLContext ctx,
|
| - EGLint attribute,
|
| - EGLint* value) {
|
| - return EGL_FALSE;
|
| -}
|
| -
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL() {
|
| - return EGL_FALSE;
|
| -}
|
| -
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine) {
|
| - return EGL_FALSE;
|
| -}
|
| -
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy,
|
| - EGLSurface surface) {
|
| +EGLBoolean eglQueryContext(EGLDisplay dpy,
|
| + EGLContext ctx,
|
| + EGLint attribute,
|
| + EGLint* value) {
|
| + return EGL_FALSE;
|
| +}
|
| +
|
| +EGLBoolean eglWaitGL() {
|
| + return EGL_FALSE;
|
| +}
|
| +
|
| +EGLBoolean eglWaitNative(EGLint engine) {
|
| + return EGL_FALSE;
|
| +}
|
| +
|
| +EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) {
|
| EGLint error_code = ValidateDisplaySurface(dpy, surface);
|
| if (error_code != EGL_SUCCESS)
|
| return EglError(error_code, EGL_FALSE);
|
| @@ -425,14 +415,14 @@
|
| return EglSuccess(EGL_TRUE);
|
| }
|
|
|
| -EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy,
|
| - EGLSurface surface,
|
| - EGLNativePixmapType target) {
|
| +EGLBoolean eglCopyBuffers(EGLDisplay dpy,
|
| + EGLSurface surface,
|
| + EGLNativePixmapType target) {
|
| return EGL_FALSE;
|
| }
|
|
|
| /* Now, define eglGetProcAddress using the generic function ptr. type */
|
| -EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
|
| +__eglMustCastToProperFunctionPointerType
|
| eglGetProcAddress(const char* procname) {
|
| return reinterpret_cast<__eglMustCastToProperFunctionPointerType>(
|
| gles2::GetGLFunctionPointer(procname));
|
|
|