Mercurial > MadButterfly
diff src/redraw_man.c @ 469:4dc0be6c044a Android_Skia
Add copy and clear graphic engine functions.
To replace set/get options, copy and clear is more meanful,
functional, and independently. set/get options are too graphic engine
dependently.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Thu, 12 Nov 2009 21:30:35 +0800 |
parents | 6e18550c8fa8 |
children | ba64f928542b |
line wrap: on
line diff
--- a/src/redraw_man.c Thu Nov 12 21:26:10 2009 +0800 +++ b/src/redraw_man.c Thu Nov 12 21:30:35 2009 +0800 @@ -1865,12 +1865,7 @@ #ifndef UNITTEST static void clear_canvas(canvas_t *canvas) { - mbe_operator_t old_op; - - old_op = mbe_get_operator(canvas); - mbe_set_operator(canvas, MBE_OPERATOR_CLEAR); - mbe_paint(canvas); - mbe_set_operator(canvas, old_op); + mbe_clear(canvas); } static void make_clip(mbe_t *cr, int n_dirty_areas, @@ -1892,15 +1887,10 @@ static void copy_cr_2_backend(redraw_man_t *rdman, int n_dirty_areas, area_t **dirty_areas) { - mbe_operator_t saved_op; - if(n_dirty_areas) make_clip(rdman->backend, n_dirty_areas, dirty_areas); - saved_op = mbe_get_operator(rdman->backend); - mbe_set_operator(rdman->backend, MBE_OPERATOR_SOURCE); - mbe_paint(rdman->backend); - mbe_set_operator(rdman->backend, saved_op); + mbe_copy_source(rdman->backend); } #else /* UNITTEST */ static void make_clip(mbe_t *cr, int n_dirty_areas,