changeset 1126:20e15872f3df

Fix bug of passing wrong object to eglQuerySurface(). It supposed to pass EGLSurface to eglQuerySurface(), but a mbe_surface_t was passed.
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 13 Dec 2010 20:19:34 +0800
parents 5b2394f67ad0
children baf4c4d48cff
files src/graph_engine_openvg.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/graph_engine_openvg.c	Sat Dec 11 21:08:51 2010 +0800
+++ b/src/graph_engine_openvg.c	Mon Dec 13 20:19:34 2010 +0800
@@ -825,6 +825,7 @@
 void
 mbe_clear(mbe_t *canvas) {
     EGLDisplay display;
+    EGLSurface *tgt_surface;
     EGLint w, h;
     EGLBoolean r;
 
@@ -832,9 +833,10 @@
 
     display = _VG_DISPLAY();
     
-    r = eglQuerySurface(display, canvas->tgt, EGL_WIDTH, &w);
+    tgt_surface = (EGLSurface *)canvas->tgt->surface;
+    r = eglQuerySurface(display, tgt_surface, EGL_WIDTH, &w);
     ASSERT(r == EGL_TRUE);
-    r = eglQuerySurface(display, canvas->tgt, EGL_HEIGHT, &h);
+    r = eglQuerySurface(display, tgt_surface, EGL_HEIGHT, &h);
     ASSERT(r == EGL_TRUE);
     
     /* Clear regions to the color specified by mbe_create() */