# HG changeset patch # User Thinker K.F. Li # Date 1278515997 -28800 # Node ID 9c5705da2495762bea35fd46a99a2bd767c824e3 # Parent 6a0be737a3f36c5852f0b9562d60af63f6361ac7 Fix the bug of foregting make current context before seting transform diff -r 6a0be737a3f3 -r 9c5705da2495 include/mb_graph_engine_openvg.h --- a/include/mb_graph_engine_openvg.h Wed Jul 07 21:55:05 2010 +0800 +++ b/include/mb_graph_engine_openvg.h Wed Jul 07 23:19:57 2010 +0800 @@ -175,6 +175,7 @@ #define mbe_transform(canvas, _mtx) \ do { \ + _MK_CURRENT_CTX(canvas); \ MB_MATRIX_2_OPENVG((canvas)->mtx, _mtx); \ _mbe_load_pattern_mtx(_mtx, NULL, \ VG_MATRIX_PATH_USER_TO_SURFACE); \ diff -r 6a0be737a3f3 -r 9c5705da2495 src/graph_engine_openvg.c --- a/src/graph_engine_openvg.c Wed Jul 07 21:55:05 2010 +0800 +++ b/src/graph_engine_openvg.c Wed Jul 07 23:19:57 2010 +0800 @@ -580,7 +580,13 @@ r = eglQuerySurface(display, canvas->tgt, EGL_HEIGHT, &h); ASSERT(r == EGL_TRUE); - /* disable scissoring and identity transform matrix */ + /* + * Disable scissoring and identity transform matrix. + * + * Transform matrix from path to surface is assigned by + * mbe_transform(). Here, we temporary set it to identity, and + * restore it after paint. + */ vgSeti(VG_SCISSORING, VG_FALSE); vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE); vgLoadIdentity();