From 3d6840cd1a99e3b68aecab4c128c26c85da223ee Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 14 Aug 2009 17:17:01 +0000 Subject: [PATCH] * evas: Fix two render bugs : - Forgot to reset clip before drawing cleanup rect. - Always draw a rect to reset the background, just choose a correct color. Note: This will slow down software_x11 engine, as this engine always do memset, so it does it twice. Before only the alpha case was impacted, now both case are. Need time to fix it. If someone has, don't hesitate :-) You can use elementary windows state test, to see if thing is going correctly or not. For the record, SDL engine has a score around 500 under X11 on my computer, where the X11 engine does only have a score around 450. SVN revision: 41770 --- legacy/evas/src/lib/canvas/evas_render.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/legacy/evas/src/lib/canvas/evas_render.c b/legacy/evas/src/lib/canvas/evas_render.c index 55bc090621..bdb4be9b7f 100644 --- a/legacy/evas/src/lib/canvas/evas_render.c +++ b/legacy/evas/src/lib/canvas/evas_render.c @@ -444,7 +444,7 @@ evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char eina_array_push(&e->temporary_objects, obj); /* reset the background of the area if needed (using cutout and engine alpha flag to help) */ - if (alpha) +/* if (alpha) */ { if (evas_object_is_opaque(obj)) e->engine.func->context_cutout_add(e->engine.data.output, @@ -479,9 +479,12 @@ evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char } } } - if (alpha) +/* if (alpha) */ { - e->engine.func->context_color_set(e->engine.data.output, e->engine.data.context, 0, 0, 0, 0); + e->engine.func->context_clip_set(e->engine.data.output, + e->engine.data.context, + ux, uy, uw, uh); + e->engine.func->context_color_set(e->engine.data.output, e->engine.data.context, 0, 0, 0, alpha ? 0 : 255); e->engine.func->context_multiplier_unset(e->engine.data.output, e->engine.data.context); e->engine.func->context_render_op_set(e->engine.data.output, e->engine.data.context, EVAS_RENDER_COPY); e->engine.func->rectangle_draw(e->engine.data.output,