From c6f907a9f4ac8e3cd3581f8f24384d523241d866 Mon Sep 17 00:00:00 2001 From: Paulo Alcantara Date: Wed, 9 Jan 2013 21:36:03 +0000 Subject: [PATCH] efl/cache: Set loaded flag properly with loaded pixels Patch by: Paulo Alcantara SVN revision: 82481 --- src/lib/evas/cache/evas_cache_image.c | 2 ++ src/lib/evas/cache2/evas_cache2.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/cache/evas_cache_image.c b/src/lib/evas/cache/evas_cache_image.c index 83d8370f7b..8a0932fa0f 100644 --- a/src/lib/evas/cache/evas_cache_image.c +++ b/src/lib/evas/cache/evas_cache_image.c @@ -903,6 +903,7 @@ evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, D return NULL; } im->references = 1; + im->flags.loaded = EINA_TRUE; if (cache->func.debug) cache->func.debug("data", im); return im; } @@ -945,6 +946,7 @@ evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h) error = cache->func.size_set(im2, im, w, h); if (error != 0) goto on_error; im2->references = 1; + im2->flags.loaded = EINA_TRUE; evas_cache_image_drop(im); if (cache->func.debug) cache->func.debug("size_set", im2); return im2; diff --git a/src/lib/evas/cache2/evas_cache2.c b/src/lib/evas/cache2/evas_cache2.c index 46cca8e169..3eaf0b3c0d 100644 --- a/src/lib/evas/cache2/evas_cache2.c +++ b/src/lib/evas/cache2/evas_cache2.c @@ -419,13 +419,13 @@ evas_cache2_image_data(Evas_Cache2 *cache, unsigned int w, unsigned int h, DATA3 im->w = w; im->h = h; im->flags.alpha = alpha; - im->flags.loaded = 1; if (cache->func.data(im, w, h, image_data, alpha, cspace) != 0) { _evas_cache_image_entry_delete(cache, im); return NULL; } im->references = 1; + im->flags.loaded = EINA_TRUE; if (cache->func.debug) cache->func.debug("data", im); return im; } @@ -470,6 +470,7 @@ evas_cache2_image_size_set(Image_Entry *im, unsigned int w, unsigned h) if (error != 0) goto on_error; im2->references = 1; + im2->flags.loaded = EINA_TRUE; evas_cache2_image_close(im); return im2; -- 2.34.1