From 70821182ff460f63171e11ea45d249ad903510c7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Tue, 25 Apr 2017 17:54:44 +0900 Subject: [PATCH] evas examples: Fix invalid assumption about proxy In the map examples, the map image UV size was based on the image source geometry, rather than the image geometry itself. In the example, this affects how the glass is mirrored. Before this patch, the reflection is a single line stretched. EFL 1.18 and 1.19 seem to have the same issue, while 1.17 simply fails to show any reflection. 1.16 fails miserably and the entire window is black. If the original code was correct, then I believe that map and/or proxy rendering have been modified in a way that affects the meaning of those image UV parameters. But this seems like the regression (if it is one) is in fact quite old. @fix --- src/examples/evas/evas-map-utils-eo.c | 4 ++-- src/examples/evas/evas-map-utils.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/examples/evas/evas-map-utils-eo.c b/src/examples/evas/evas-map-utils-eo.c index adf23a393f..329bd6c113 100644 --- a/src/examples/evas/evas-map-utils-eo.c +++ b/src/examples/evas/evas-map-utils-eo.c @@ -142,8 +142,8 @@ _anim_cb(void *data) efl_gfx_map_enable_set(o, EINA_TRUE); o = evas_object_name_find(ad->canvas, "obj4"); - evas_object_geometry_get(o, &x, &y, &w, &h); - evas_object_image_size_get(evas_object_image_source_get(o), &img_w, &img_h); + efl_gfx_geometry_get(o, &x, &y, &w, &h); + efl_gfx_view_size_get(o, &img_w, &img_h); efl_gfx_map_dup(o, ref); efl_gfx_map_point_coord_set(o, 0, x, y + h, 0); diff --git a/src/examples/evas/evas-map-utils.c b/src/examples/evas/evas-map-utils.c index 1ea90157f8..746f8d5eac 100644 --- a/src/examples/evas/evas-map-utils.c +++ b/src/examples/evas/evas-map-utils.c @@ -141,7 +141,7 @@ _anim_cb(void *data) o = evas_object_name_find(ad->canvas, "obj4"); evas_object_geometry_get(o, &x, &y, &w, &h); - evas_object_image_size_get(evas_object_image_source_get(o), &img_w, &img_h); + evas_object_image_size_get(o, &img_w, &img_h); m = evas_map_new(4); evas_map_point_coord_set(m, 0, x, y + h, 0);