Mercurial > MadButterfly
changeset 594:d416e1fff71a openvg
Fix bug of mbe_copy_source() of cairo.
Must install pattern as source on target canvas instead of source
canvas.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 30 Jun 2010 23:15:42 +0800 |
parents | ac942664fe86 |
children | aaaaa03af04d |
files | include/mb_graph_engine_cairo.h src/X_supp.c |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/include/mb_graph_engine_cairo.h Wed Jun 30 22:57:23 2010 +0800 +++ b/include/mb_graph_engine_cairo.h Wed Jun 30 23:15:42 2010 +0800 @@ -113,7 +113,7 @@ surf = cairo_get_target(src); ptn = cairo_pattern_create_for_surface(surf); - cairo_set_source(src, ptn); + cairo_set_source(dst, ptn); cairo_pattern_destroy(ptn); saved_op = cairo_get_operator(dst); cairo_set_operator(dst, CAIRO_OPERATOR_SOURCE);
--- a/src/X_supp.c Wed Jun 30 22:57:23 2010 +0800 +++ b/src/X_supp.c Wed Jun 30 23:15:42 2010 +0800 @@ -484,6 +484,10 @@ xmb_rt->cr = mbe_create(xmb_rt->surface); xmb_rt->backend_cr = mbe_create(xmb_rt->backend_surface); + /* TODO: Remove this line. Since we use mbe_copy_source(), it + * will set source for the backend. So, this line is redundants. + * It can be removed. sourface_ptn can be removed, too. + */ mbe_set_source(xmb_rt->backend_cr, xmb_rt->surface_ptn); xmb_rt->rdman = (redraw_man_t *)malloc(sizeof(redraw_man_t));