From b38f8a3f39008845ac42ee04a83cf76c23b281c0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Fri, 2 Oct 2015 16:51:43 +0900 Subject: [PATCH] Evas GL: Fix render: force pixel_get if dirty All examples and docs point to using only the dirty flag in order to trigger a redraw of an Evas GL surface. The commit 21c43528234 broke this behaviour (for a good reason, but not related to Evas GL). This is a compatibility fix. --- src/lib/evas/canvas/evas_object_image.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index b366831..76c1009 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -3751,6 +3751,19 @@ evas_object_image_render_pre(Evas_Object *eo_obj, evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj, obj); if (!o->pixels->pixel_updates) goto done; } + if (o->dirty_pixels && ENFN->image_native_get) + { + /* Evas GL surfaces have historically required only the dirty + * pixel to trigger a redraw (call to pixels_get). Other kinds + * of surfaces must add data update regions. */ + Evas_Native_Surface *ns; + ns = ENFN->image_native_get(ENDT, o->engine_data); + if (ns && (ns->type == EVAS_NATIVE_SURFACE_EVASGL)) + { + evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj, obj); + if (!o->pixels->pixel_updates) goto done; + } + } if (o->cur->frame != o->prev->frame) { evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj, obj); -- 2.7.4