forked from enlightenment/efl
efl/cache: Set loaded flag properly with loaded pixels
Patch by: Paulo Alcantara <pcacjr@profusion.mobi> SVN revision: 82481
This commit is contained in:
parent
1c1d9f4161
commit
c6f907a9f4
|
@ -903,6 +903,7 @@ evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, D
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
im->references = 1;
|
im->references = 1;
|
||||||
|
im->flags.loaded = EINA_TRUE;
|
||||||
if (cache->func.debug) cache->func.debug("data", im);
|
if (cache->func.debug) cache->func.debug("data", im);
|
||||||
return 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);
|
error = cache->func.size_set(im2, im, w, h);
|
||||||
if (error != 0) goto on_error;
|
if (error != 0) goto on_error;
|
||||||
im2->references = 1;
|
im2->references = 1;
|
||||||
|
im2->flags.loaded = EINA_TRUE;
|
||||||
evas_cache_image_drop(im);
|
evas_cache_image_drop(im);
|
||||||
if (cache->func.debug) cache->func.debug("size_set", im2);
|
if (cache->func.debug) cache->func.debug("size_set", im2);
|
||||||
return im2;
|
return im2;
|
||||||
|
|
|
@ -419,13 +419,13 @@ evas_cache2_image_data(Evas_Cache2 *cache, unsigned int w, unsigned int h, DATA3
|
||||||
im->w = w;
|
im->w = w;
|
||||||
im->h = h;
|
im->h = h;
|
||||||
im->flags.alpha = alpha;
|
im->flags.alpha = alpha;
|
||||||
im->flags.loaded = 1;
|
|
||||||
if (cache->func.data(im, w, h, image_data, alpha, cspace) != 0)
|
if (cache->func.data(im, w, h, image_data, alpha, cspace) != 0)
|
||||||
{
|
{
|
||||||
_evas_cache_image_entry_delete(cache, im);
|
_evas_cache_image_entry_delete(cache, im);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
im->references = 1;
|
im->references = 1;
|
||||||
|
im->flags.loaded = EINA_TRUE;
|
||||||
if (cache->func.debug) cache->func.debug("data", im);
|
if (cache->func.debug) cache->func.debug("data", im);
|
||||||
return 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;
|
if (error != 0) goto on_error;
|
||||||
|
|
||||||
im2->references = 1;
|
im2->references = 1;
|
||||||
|
im2->flags.loaded = EINA_TRUE;
|
||||||
|
|
||||||
evas_cache2_image_close(im);
|
evas_cache2_image_close(im);
|
||||||
return im2;
|
return im2;
|
||||||
|
|
Loading…
Reference in New Issue