From 5c66c6e55c94c8047b09c15257e76b4b25626e98 Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Fri, 28 Oct 2011 13:53:27 +0900 Subject: [PATCH] we can't limit sizes on load because of "i'm just loading the header to find out the size" tricks. :( git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@64410 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 Conflicts: src/modules/engines/gl_common/evas_gl_image.c --- src/modules/engines/gl_common/evas_gl_image.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/modules/engines/gl_common/evas_gl_image.c b/src/modules/engines/gl_common/evas_gl_image.c index 07eba7b..44c32f7 100644 --- a/src/modules/engines/gl_common/evas_gl_image.c +++ b/src/modules/engines/gl_common/evas_gl_image.c @@ -106,6 +106,18 @@ evas_gl_common_image_load(Evas_Engine_GL_Context *gc, const char *file, const ch im_im = evas_common_load_image_from_file(file, key, lo, error); if (!im_im) return NULL; + /* i'd LOVe to do this, but we can't because we load to load header + * to get image size to know if its too big or not! so this disallows + * us to know that - photocam thus suffers + if (((int)im_im->cache_entry.w > gc->shared->info.max_texture_size) || + ((int)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) { -- 2.7.4