comparison src/graph_engine_openvg.c @ 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 7451af5d63ec
children baf4c4d48cff
comparison
equal deleted inserted replaced
1125:5b2394f67ad0 1126:20e15872f3df
823 } 823 }
824 824
825 void 825 void
826 mbe_clear(mbe_t *canvas) { 826 mbe_clear(mbe_t *canvas) {
827 EGLDisplay display; 827 EGLDisplay display;
828 EGLSurface *tgt_surface;
828 EGLint w, h; 829 EGLint w, h;
829 EGLBoolean r; 830 EGLBoolean r;
830 831
831 _MK_CURRENT_CTX(canvas); 832 _MK_CURRENT_CTX(canvas);
832 833
833 display = _VG_DISPLAY(); 834 display = _VG_DISPLAY();
834 835
835 r = eglQuerySurface(display, canvas->tgt, EGL_WIDTH, &w); 836 tgt_surface = (EGLSurface *)canvas->tgt->surface;
837 r = eglQuerySurface(display, tgt_surface, EGL_WIDTH, &w);
836 ASSERT(r == EGL_TRUE); 838 ASSERT(r == EGL_TRUE);
837 r = eglQuerySurface(display, canvas->tgt, EGL_HEIGHT, &h); 839 r = eglQuerySurface(display, tgt_surface, EGL_HEIGHT, &h);
838 ASSERT(r == EGL_TRUE); 840 ASSERT(r == EGL_TRUE);
839 841
840 /* Clear regions to the color specified by mbe_create() */ 842 /* Clear regions to the color specified by mbe_create() */
841 vgClear(0, 0, w, h); 843 vgClear(0, 0, w, h);
842 } 844 }