{
ERR("Current context is NULL, not calling glGetString");
// This sets evas_gl_error_get instead of eglGetError...
- evas_gl_common_error_set(NULL, EVAS_GL_BAD_CONTEXT);
+ evas_gl_common_error_set(EVAS_GL_BAD_CONTEXT);
return NULL;
}
if (!evgl_engine || !evgl_engine->funcs || !evgl_engine->funcs->display_get)
{
ERR("%s: Invalid Engine... (Can't acccess EGL Display)\n", function);
- evas_gl_common_error_set(NULL, EVAS_GL_BAD_DISPLAY);
+ evas_gl_common_error_set(EVAS_GL_BAD_DISPLAY);
return EGL_NO_DISPLAY;
}
{
if (evgl) goto fallback;
ERR("%s: Unable to execute GL command. Error retrieving tls", function);
- evas_gl_common_error_set(NULL, EVAS_GL_NOT_INITIALIZED);
+ evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
return EGL_NO_DISPLAY;
}
{
if (evgl) goto fallback;
ERR("%s: no current engine set; ensure you've called evas_gl_make_current()", function);
- evas_gl_common_error_set(NULL, EVAS_GL_NOT_INITIALIZED);
+ evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
return EGL_NO_DISPLAY;
}
if (!dpy || !evasgl)
{
ERR("Evas_GL can not be NULL here.");
- evas_gl_common_error_set(NULL, EVAS_GL_BAD_DISPLAY);
+ evas_gl_common_error_set(EVAS_GL_BAD_DISPLAY);
return NULL;
}
if (!img)
{
ERR("EvasGLImage is NULL.");
- evas_gl_common_error_set(NULL, EVAS_GL_BAD_PARAMETER);
+ evas_gl_common_error_set(EVAS_GL_BAD_PARAMETER);
return;
}
{
ERR("Current context is NULL, not calling glGetString");
// This sets evas_gl_error_get instead of glGetError...
- evas_gl_common_error_set(NULL, EVAS_GL_BAD_CONTEXT);
+ evas_gl_common_error_set(EVAS_GL_BAD_CONTEXT);
return NULL;
}
if (rsc->current_ctx->version != EVAS_GL_GLES_1_X)
{
ERR("Invalid context version %d", (int) rsc->current_ctx->version);
- evas_gl_common_error_set(NULL, EVAS_GL_BAD_MATCH);
+ evas_gl_common_error_set(EVAS_GL_BAD_MATCH);
return NULL;
}
EAPI void evas_gl_preload_render_relax(evas_gl_make_current_cb make_current, void *engine_data);
EAPI void evas_gl_symbols(void *(*GetProcAddress)(const char *name), const char *extsn);
-EAPI void evas_gl_common_error_set(void *data, int error_enum);
-EAPI int evas_gl_common_error_get(void *data);
+EAPI void evas_gl_common_error_set(int error_enum);
+EAPI int evas_gl_common_error_get(void);
EAPI void *evas_gl_common_current_context_get(void);
typedef int (*Evas_GL_Preload)(void);
}
EAPI void
-evas_gl_common_error_set(void *data EINA_UNUSED, int error_enum)
+evas_gl_common_error_set(int error_enum)
{
EVGL_Resource *rsc;
}
EAPI int
-evas_gl_common_error_get(void *data EINA_UNUSED)
+evas_gl_common_error_get(void)
{
EVGL_Resource *rsc;
if (!evgl_engine)
{
ERR("Invalid EVGL Engine!");
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_ACCESS);
+ evas_gl_common_error_set(EVAS_GL_BAD_ACCESS);
return NULL;
}
dbg = evgl_engine->api_debug_mode;
if (!cfg)
{
ERR("Invalid Config!");
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_CONFIG);
+ evas_gl_common_error_set(EVAS_GL_BAD_CONFIG);
return NULL;
}
{
ERR("Requested surface size [%d, %d] is greater than max supported size [%d, %d]",
w, h, evgl_engine->caps.max_w, evgl_engine->caps.max_h);
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_PARAMETER);
+ evas_gl_common_error_set(EVAS_GL_BAD_PARAMETER);
return NULL;
}
if (!sfc)
{
ERR("Surface allocation failed.");
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_ALLOC);
+ evas_gl_common_error_set(EVAS_GL_BAD_ALLOC);
goto error;
}
if (!_internal_config_set(eng_data, sfc, cfg))
{
ERR("Unsupported Format!");
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_CONFIG);
+ evas_gl_common_error_set(EVAS_GL_BAD_CONFIG);
goto error;
}
sfc->cfg = cfg;
if (!evgl_engine)
{
ERR("Invalid EVGL Engine!");
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_ACCESS);
+ evas_gl_common_error_set(EVAS_GL_BAD_ACCESS);
return NULL;
}
dbg = evgl_engine->api_debug_mode;
if (!cfg)
{
ERR("Invalid Config!");
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_CONFIG);
+ evas_gl_common_error_set(EVAS_GL_BAD_CONFIG);
return NULL;
}
if (!evgl_engine->funcs->pbuffer_surface_create)
{
ERR("Engine can not create PBuffers");
- evas_gl_common_error_set(eng_data, EVAS_GL_NOT_INITIALIZED);
+ evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
return NULL;
}
if (!sfc)
{
ERR("Surface allocation failed.");
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_ALLOC);
+ evas_gl_common_error_set(EVAS_GL_BAD_ALLOC);
goto error;
}
if (!_internal_config_set(eng_data, sfc, cfg))
{
ERR("Unsupported Format!");
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_CONFIG);
+ evas_gl_common_error_set(EVAS_GL_BAD_CONFIG);
goto error;
}
}
if (!evgl_engine)
{
ERR("Invalid EVGL Engine!");
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_ACCESS);
+ evas_gl_common_error_set(EVAS_GL_BAD_ACCESS);
return NULL;
}
if ((version < EVAS_GL_GLES_1_X) || (version > EVAS_GL_GLES_3_X))
{
ERR("Invalid context version number %d", version);
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_PARAMETER);
+ evas_gl_common_error_set(EVAS_GL_BAD_PARAMETER);
return NULL;
}
if (!ctx)
{
ERR("Error allocating context object.");
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_ALLOC);
+ evas_gl_common_error_set(EVAS_GL_BAD_ALLOC);
return NULL;
}
if ( (!evgl_engine) || ((sfc) && (!ctx)) )
{
ERR("Invalid Input: Engine: %p, Surface: %p, Context: %p", evgl_engine, sfc, ctx);
- if (!evgl_engine) evas_gl_common_error_set(eng_data, EVAS_GL_NOT_INITIALIZED);
- if (!ctx) evas_gl_common_error_set(eng_data, EVAS_GL_BAD_CONTEXT);
+ if (!evgl_engine) evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
+ if (!ctx) evas_gl_common_error_set(EVAS_GL_BAD_CONTEXT);
return 0;
}
if (!_internal_resource_make_current(eng_data, sfc, ctx))
{
ERR("Error doing a make current with internal surface. Context: %p", ctx);
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_CONTEXT);
+ evas_gl_common_error_set(EVAS_GL_BAD_CONTEXT);
return 0;
}
if (!evgl_api_get(eng_data, ctx->version, EINA_FALSE))
{
ERR("Unable to get the list of GL APIs for version %d", ctx->version);
- evas_gl_common_error_set(eng_data, EVAS_GL_NOT_INITIALIZED);
+ evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
return 0;
}
if (!_context_ext_check(ctx))
{
ERR("Unable to check required extension for the current context");
- evas_gl_common_error_set(eng_data, EVAS_GL_NOT_INITIALIZED);
+ evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
return 0;
}
}
if (!sfc->color_buf && !_surface_buffers_create(sfc))
{
ERR("Unable to create specified surfaces.");
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_ALLOC);
+ evas_gl_common_error_set(EVAS_GL_BAD_ALLOC);
return 0;
}
if (!_surface_buffers_allocate(eng_data, sfc, 0, 0, ctx->version))
{
ERR("Unable to destroy surface buffers!");
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_ALLOC);
+ evas_gl_common_error_set(EVAS_GL_BAD_ALLOC);
return 0;
}
sfc->buffers_allocated = 0;
if (!_surface_buffers_allocate(eng_data, sfc, sfc->w, sfc->h, ctx->version))
{
ERR("Unable Create Specificed Surfaces. Unsupported format!");
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_ALLOC);
+ evas_gl_common_error_set(EVAS_GL_BAD_ALLOC);
return 0;
}
sfc->buffers_allocated = 1;
if (!_surface_buffers_allocate(eng_data, sfc, sfc->w, sfc->h, ctx->version))
{
ERR("Unable Create Allocate Memory for Surface.");
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_ALLOC);
+ evas_gl_common_error_set(EVAS_GL_BAD_ALLOC);
return 0;
}
sfc->buffers_allocated = 1;
if (!_surface_buffers_fbo_set(sfc, ctx->surface_fbo, ctx->version))
{
ERR("Attaching buffers to context fbo failed. Engine: %p Surface: %p Context FBO: %u", evgl_engine, sfc, ctx->surface_fbo);
- evas_gl_common_error_set(eng_data, EVAS_GL_BAD_CONTEXT);
+ evas_gl_common_error_set(EVAS_GL_BAD_CONTEXT);
return 0;
}
}
*/
default: break;
}
- evas_gl_common_error_set(engine, EVAS_GL_BAD_ATTRIBUTE);
+ evas_gl_common_error_set(EVAS_GL_BAD_ATTRIBUTE);
return EINA_FALSE;
}
#else
if (!re)
{
ERR("Invalid Render Engine Data!");
- glsym_evas_gl_common_error_set(data, EVAS_GL_NOT_INITIALIZED);
+ glsym_evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
return 0;
}
if (!ret)
{
ERR("glXMakeContextCurrent() failed!");
- glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_DISPLAY);
+ glsym_evas_gl_common_error_set(EVAS_GL_BAD_DISPLAY);
return 0;
}
return 1;
{
ERR("glXMakeContextCurrent() failed. Ret: %d! Context: %p Surface: %p",
ret, (void *)ctx, (void *)sfc);
- glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_DISPLAY);
+ glsym_evas_gl_common_error_set(EVAS_GL_BAD_DISPLAY);
return 0;
}
}
if (!re)
{
ERR("Invalid Render Engine Data!");
- glsym_evas_gl_common_error_set(data, EVAS_GL_NOT_INITIALIZED);
+ glsym_evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
return NULL;
}
if (!win)
{
ERR("Creating native X window failed.");
- glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_DISPLAY);
+ glsym_evas_gl_common_error_set(EVAS_GL_BAD_DISPLAY);
return NULL;
}
if (!re)
{
ERR("Invalid Render Engine Data!");
- glsym_evas_gl_common_error_set(data, EVAS_GL_NOT_INITIALIZED);
+ glsym_evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
return 0;
}
if (!native_window)
{
ERR("Inavlid native surface.");
- glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_NATIVE_WINDOW);
+ glsym_evas_gl_common_error_set(EVAS_GL_BAD_NATIVE_WINDOW);
return 0;
}
if (!re)
{
ERR("Invalid Render Engine Data!");
- glsym_evas_gl_common_error_set(data, EVAS_GL_NOT_INITIALIZED);
+ glsym_evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
return NULL;
}
if (!re)
{
ERR("Invalid Render Engine Data!");
- glsym_evas_gl_common_error_set(data, EVAS_GL_NOT_INITIALIZED);
+ glsym_evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
return 0;
}
if (!surface)
{
ERR("Invalid surface.");
- glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_SURFACE);
+ glsym_evas_gl_common_error_set(EVAS_GL_BAD_SURFACE);
return 0;
}
if (!re)
{
ERR("Invalid Render Engine Data!");
- glsym_evas_gl_common_error_set(data, EVAS_GL_NOT_INITIALIZED);
+ glsym_evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
return NULL;
}
if ((version < EVAS_GL_GLES_1_X) || (version > EVAS_GL_GLES_3_X))
{
ERR("Invalid context version number %d", version);
- glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_PARAMETER);
+ glsym_evas_gl_common_error_set(EVAS_GL_BAD_PARAMETER);
return NULL;
}
((!eng_get_ob(re)->gl_context) || (eng_get_ob(re)->gl_context->gles_version != EVAS_GL_GLES_3_X)))
{
ERR("GLES 3 version not supported!");
- glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_ATTRIBUTE);
+ glsym_evas_gl_common_error_set(EVAS_GL_BAD_ATTRIBUTE);
return NULL;
}
EGLContext context = EGL_NO_CONTEXT;
{
int err = eglGetError();
ERR("Engine Context Creations Failed. Error: %#x.", err);
- glsym_evas_gl_common_error_set(data, err - EGL_SUCCESS);
+ glsym_evas_gl_common_error_set(err - EGL_SUCCESS);
return NULL;
}
if (!context)
{
ERR("Internal Resource Context Creations Failed.");
- if(!(eng_get_ob(re)->info->info.display)) glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_DISPLAY);
- if(!(eng_get_ob(re)->win)) glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_NATIVE_WINDOW);
+ if(!(eng_get_ob(re)->info->info.display)) glsym_evas_gl_common_error_set(EVAS_GL_BAD_DISPLAY);
+ if(!(eng_get_ob(re)->win)) glsym_evas_gl_common_error_set(EVAS_GL_BAD_NATIVE_WINDOW);
return NULL;
}
if ((!re) || (!context))
{
ERR("Invalid Render Input Data. Engine: %p, Context: %p", data, context);
- if (!re) glsym_evas_gl_common_error_set(data, EVAS_GL_NOT_INITIALIZED);
- if (!context) glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_CONTEXT);
+ if (!re) glsym_evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
+ if (!context) glsym_evas_gl_common_error_set(EVAS_GL_BAD_CONTEXT);
return 0;
}
if (!re)
{
ERR("Invalid Render Engine Data!");
- glsym_evas_gl_common_error_set(data, EVAS_GL_NOT_INITIALIZED);
+ glsym_evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
return NULL;
}
if (!re)
{
ERR("Invalid Render Engine Data!");
- glsym_evas_gl_common_error_set(data, EVAS_GL_NOT_INITIALIZED);
+ glsym_evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
return 0;
}
else
{
ERR("Unable to retrieve rotation angle.");
- glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_CONTEXT);
+ glsym_evas_gl_common_error_set(EVAS_GL_BAD_CONTEXT);
return 0;
}
}
|| (num_config < 1))
{
int err = eglGetError();
- glsym_evas_gl_common_error_set(data, err - EGL_SUCCESS);
+ glsym_evas_gl_common_error_set(err - EGL_SUCCESS);
ERR("eglChooseConfig failed with error %x", err);
return NULL;
}
if (!egl_sfc)
{
int err = eglGetError();
- glsym_evas_gl_common_error_set(data, err - EGL_SUCCESS);
+ glsym_evas_gl_common_error_set(err - EGL_SUCCESS);
ERR("eglCreatePbufferSurface failed with error %x", err);
return NULL;
}
if (!data)
{
ERR("Invalid Render Engine Data!");
- glsym_evas_gl_common_error_set(NULL, EVAS_GL_NOT_INITIALIZED);
+ glsym_evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
return 0;
}
if (!surface)
{
ERR("Invalid surface.");
- glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_SURFACE);
+ glsym_evas_gl_common_error_set(EVAS_GL_BAD_SURFACE);
return 0;
}
if (!re || !evgl_sfc || !cfg)
{
- glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_PARAMETER);
+ glsym_evas_gl_common_error_set(EVAS_GL_BAD_PARAMETER);
return NULL;
}
if ((w < 1) || (h < 1))
{
ERR("Inconsistent parameters, not creating any surface!");
- glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_PARAMETER);
+ glsym_evas_gl_common_error_set(EVAS_GL_BAD_PARAMETER);
return NULL;
}
if (!px)
{
ERR("Failed to create XPixmap!");
- glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_ALLOC);
+ glsym_evas_gl_common_error_set(EVAS_GL_BAD_ALLOC);
return NULL;
}
{
int err = eglGetError();
ERR("eglChooseConfig() can't find any configs, error: %x", err);
- glsym_evas_gl_common_error_set(data, err - EGL_SUCCESS);
+ glsym_evas_gl_common_error_set(err - EGL_SUCCESS);
XFreePixmap(eng_get_ob(re)->disp, px);
return NULL;
}
{
int err = eglGetError();
ERR("eglCreatePixmapSurface failed with error: %x", err);
- glsym_evas_gl_common_error_set(data, err - EGL_SUCCESS);
+ glsym_evas_gl_common_error_set(err - EGL_SUCCESS);
XFreePixmap(eng_get_ob(re)->disp, px);
return NULL;
}
if (!re)
{
ERR("Invalid Render Engine Data!");
- glsym_evas_gl_common_error_set(data, EVAS_GL_NOT_INITIALIZED);
+ glsym_evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
return 0;
}
if ((!evgl_sfc) || (!evgl_sfc->indirect_sfc))
{
ERR("Invalid surface");
- glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_SURFACE);
+ glsym_evas_gl_common_error_set(EVAS_GL_BAD_SURFACE);
return 0;
}
if (!evgl_sfc->indirect_sfc_native)
{
ERR("Inconsistent parameters, not freeing XPixmap for indirect surface!");
- glsym_evas_gl_common_error_set(data, EVAS_GL_BAD_PARAMETER);
+ glsym_evas_gl_common_error_set(EVAS_GL_BAD_PARAMETER);
return 0;
}
{
int err = eglGetError();
ERR("eglCreateContext failed with error 0x%x", err);
- glsym_evas_gl_common_error_set(data, err - EGL_SUCCESS);
+ glsym_evas_gl_common_error_set(err - EGL_SUCCESS);
return NULL;
}
#endif
end:
- glsym_evas_gl_common_error_set(engine, EVAS_GL_SUCCESS);
+ glsym_evas_gl_common_error_set(EVAS_GL_SUCCESS);
return err;
}