summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-12-09 21:36:45 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-12-10 10:52:22 +0900
commit4cf2d75715d6d9c3bc7f02a246997b0ca7a330cd (patch)
tree924d4e228e9c5c4a1b428fac0e9033aed7681788 /src/lib/evas/canvas
parentf52be78699a2a3165a74f37910eabefec68a977d (diff)
Evas GL: Fix direct rendering with client-side rotation
There was a problem when checking whether the current surface is compatible with direct rendering. In case of client-side rotation (it's a flag set on the surface by the app), a surface can be directly rendered even if the rotation is not 0. But, before this patch, it was assumed that the surface was current. Which doesn't make sense because make_current is called by the pixel callback, from the application, and this happens *after* we check for direct rendering. As a consequence, it was not possible to mix directly rendered surfaces with FBO-based ones, and use client-side rotation. This patch should solve that issue.
Diffstat (limited to 'src/lib/evas/canvas')
-rw-r--r--src/lib/evas/canvas/evas_object_image.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index fdd716147e..ce03b7158c 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -2759,25 +2759,27 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj,
2759 (ns->data.opengl.texture_id) && 2759 (ns->data.opengl.texture_id) &&
2760 (!ns->data.opengl.framebuffer_id) ) 2760 (!ns->data.opengl.framebuffer_id) )
2761 { 2761 {
2762 Eina_Bool direct_renderable = EINA_FALSE;
2763
2762 // Check if we can do direct rendering... 2764 // Check if we can do direct rendering...
2763 if (ENFN->gl_direct_override_get) 2765 if (ENFN->gl_direct_override_get)
2764 ENFN->gl_direct_override_get(output, &direct_override, &direct_force_off); 2766 ENFN->gl_direct_override_get(output, &direct_override, &direct_force_off);
2765 if ( (((obj->cur->geometry.w == o->cur->image.w) && 2767 if (ENFN->gl_surface_direct_renderable_get)
2768 direct_renderable = ENFN->gl_surface_direct_renderable_get(output, ns);
2769
2770 if ( ((direct_override) ||
2771 ((direct_renderable) &&
2772 (obj->cur->geometry.w == o->cur->image.w) &&
2766 (obj->cur->geometry.h == o->cur->image.h) && 2773 (obj->cur->geometry.h == o->cur->image.h) &&
2767 (obj->cur->color.r == 255) && 2774 (obj->cur->color.r == 255) &&
2768 (obj->cur->color.g == 255) && 2775 (obj->cur->color.g == 255) &&
2769 (obj->cur->color.b == 255) && 2776 (obj->cur->color.b == 255) &&
2770 (obj->cur->color.a == 255) && 2777 (obj->cur->color.a == 255) &&
2771 (!obj->map->cur.map)) || 2778 (!obj->map->cur.map))
2772 (direct_override)) && 2779 ) && (!direct_force_off) )
2773 (!direct_force_off) )
2774 { 2780 {
2775
2776 if (ENFN->gl_get_pixels_set) 2781 if (ENFN->gl_get_pixels_set)
2777 { 2782 ENFN->gl_get_pixels_set(output, o->pixels->func.get_pixels, o->pixels->func.get_pixels_data, eo_obj);
2778 ENFN->gl_get_pixels_set(output, o->pixels->func.get_pixels, o->pixels->func.get_pixels_data, eo_obj);
2779 }
2780
2781 o->direct_render = EINA_TRUE; 2783 o->direct_render = EINA_TRUE;
2782 } 2784 }
2783 else 2785 else