Mercurial > MadButterfly
changeset 614:9c5705da2495 openvg
Fix the bug of foregting make current context before seting transform
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 07 Jul 2010 23:19:57 +0800 |
parents | 6a0be737a3f3 |
children | 0f0abc48e10a |
files | include/mb_graph_engine_openvg.h src/graph_engine_openvg.c |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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); \
--- 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();