im_im = evas_common_load_image_from_file(file, key, lo, error);
if (!im_im) return NULL;
+
+ if ((im_im->cache_entry.w > gc->shared->info.max_texture_size) ||
+ (im_im->cache_entry.h > gc->shared->info.max_texture_size))
+ {
+ evas_cache_image_drop(&(im_im->cache_entry));
+ *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
+ return NULL;
+ }
// FIXME: keep unreffed shared images around
EINA_LIST_FOREACH(gc->shared->images, l, im)
{
// why did i put this here? i think to free the rgba pixel data once a texture
// exists.
-// evas_cache_image_drop(&im_im->cache_entry);
+// evas_cache_image_drop(&(im_im->cache_entry));
gc->shared->images = eina_list_remove_list(gc->shared->images, l);
gc->shared->images = eina_list_prepend(gc->shared->images, im);
evas_gl_common_image_ref(im);
im = calloc(1, sizeof(Evas_GL_Image));
if (!im)
{
+ evas_cache_image_drop(&(im_im->cache_entry));
*error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
return NULL;
}
Evas_GL_Image *im;
Eina_List *l;
+ if ((w > gc->shared->info.max_texture_size) ||
+ (h > gc->shared->info.max_texture_size))
+ return NULL;
+
if (data)
{
EINA_LIST_FOREACH(gc->shared->images, l, im)
{
Evas_GL_Image *im;
+ if ((w > gc->shared->info.max_texture_size) ||
+ (h > gc->shared->info.max_texture_size))
+ return NULL;
+
im = calloc(1, sizeof(Evas_GL_Image));
if (!im) return NULL;
im->references = 1;
{
Evas_GL_Image *im;
+ if ((w > gc->shared->info.max_texture_size) ||
+ (h > gc->shared->info.max_texture_size))
+ return NULL;
+
im = calloc(1, sizeof(Evas_GL_Image));
if (!im) return NULL;
im->references = 1;
{
Evas_GL_Image *im;
+ if ((w > gc->shared->info.max_texture_size) ||
+ (h > gc->shared->info.max_texture_size))
+ return NULL;
+
im = calloc(1, sizeof(Evas_GL_Image));
if (!im) return NULL;
im->references = 1;