raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ddcc7ab82514b73f9c3a8b1cc933761ca04ff5d0

commit ddcc7ab82514b73f9c3a8b1cc933761ca04ff5d0
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Sat May 9 14:02:04 2020 +0100

    evas + gl - fix callback-to-app-changes-state issue with pixel data
    
    so if we call a callback that has e do something like set new pixel
    data in a pixel data provider and we do it from the is pixel inside
    call ebcause pixels were marked as dirty - pixels may no longer exist
    after that, so re-get to make sure and handle properly.
    
    this was found with tiling + e + shaped windows + moving them around
    in tiling. it's a valid efl bug though.
    
    @fix
---
 src/lib/evas/canvas/evas_image_legacy.c | 3 +--
 src/lib/evas/canvas/evas_object_image.c | 3 +++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_image_legacy.c 
b/src/lib/evas/canvas/evas_image_legacy.c
index d1dcf933ee..4901c3aeb5 100644
--- a/src/lib/evas/canvas/evas_image_legacy.c
+++ b/src/lib/evas/canvas/evas_image_legacy.c
@@ -673,6 +673,7 @@ evas_object_image_data_set(Eo *eo_obj, void *data)
         if (o->engine_data)
           {
              ENFN->image_free(ENC, o->engine_data);
+             o->engine_data = NULL;
              o->changed = EINA_TRUE;
              evas_object_change(eo_obj, obj);
           }
@@ -687,8 +688,6 @@ evas_object_image_data_set(Eo *eo_obj, void *data)
              state_write->image.stride = 0;
           }
         EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
-
-        o->engine_data = NULL;
      }
 /* FIXME - in engine call above
    if (o->engine_data)
diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index 8d714035a6..cad6291286 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -3514,6 +3514,9 @@ evas_object_image_is_inside(Evas_Object *eo_obj,
              o->pixels->func.get_pixels(o->pixels->func.get_pixels_data, 
eo_obj);
              if (ENFN->gl_get_pixels_post)
                ENFN->gl_get_pixels_post(ENC, output);
+             pixels = _evas_image_pixels_get(eo_obj, obj, ENC, output, NULL, 
NULL, 0, 0,
+                                             &imagew, &imageh, &uvw, &uvh, 
EINA_TRUE, EINA_FALSE);
+             if (!pixels) return is_inside;
           }
      }
 

-- 


Reply via email to