aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_gl.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-09-19 15:17:08 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-10-20 12:16:08 +0900
commit29e7f54ea0458e4634fd0d9d3f1290063a1bdbf3 (patch)
tree1d97d06b2a343de013dd78aaf9e2e99a2fea1f40 /src/lib/evas/canvas/evas_gl.c
parentEvas GL: Add support for fence_sync and similar extensions (diff)
downloadefl-29e7f54ea0458e4634fd0d9d3f1290063a1bdbf3.tar.gz
Evas GL: Add evas_gl_surface_query
When using EGL, this function should return the properties of a surface. Limited to a subset of known attributes. Right now, this function will only work fine with EGL. GLX support or any other engine is not implemented. @feature
Diffstat (limited to 'src/lib/evas/canvas/evas_gl.c')
-rw-r--r--src/lib/evas/canvas/evas_gl.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_gl.c b/src/lib/evas/canvas/evas_gl.c
index 5e8fac263b..3b7286c9ef 100644
--- a/src/lib/evas/canvas/evas_gl.c
+++ b/src/lib/evas/canvas/evas_gl.c
@@ -531,3 +531,29 @@ end:
_evas_gl_internal_error_set(evas_gl, EVAS_GL_SUCCESS);
return err;
}
+
+EAPI Eina_Bool
+evas_gl_surface_query(Evas_GL *evas_gl, Evas_GL_Surface *surface, int attribute, void *value)
+{
+ if (!evas_gl) return EINA_FALSE;
+ if (!surface)
+ {
+ _evas_gl_internal_error_set(evas_gl, EVAS_GL_BAD_SURFACE);
+ return EINA_FALSE;
+ }
+
+ if (!evas_gl->evas->engine.func->gl_surface_query)
+ {
+ _evas_gl_internal_error_set(evas_gl, EVAS_GL_NOT_INITIALIZED);
+ return EINA_FALSE;
+ }
+
+ if (!value)
+ {
+ _evas_gl_internal_error_set(evas_gl, EVAS_GL_BAD_PARAMETER);
+ return EINA_FALSE;
+ }
+
+ return evas_gl->evas->engine.func->gl_surface_query
+ (evas_gl->evas->engine.data.output, surface->data, attribute, value);
+}