From: Jiyoun Park <jy0703.park@samsung.com>
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 25 Aug 2011 04:48:45 +0000 (04:48 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 25 Aug 2011 04:48:45 +0000 (04:48 +0000)
commitd429d3c78fa6b6985ab6fa61b5f0dc2f2075271a
tree850fe3b4b99ed378647419bcd7d2500c35d8e717
parent7c0b6079ea8db6107023cd7a55ececb46433b81b
From: Jiyoun Park <jy0703.park@samsung.com>
Subject: [E-devel] [Patch] evas gl engine's texture creation

Hello.

1. _pool_tex_dynamic_new function, it didn\92t set pt to NULL when secsym_eglCreateImage function failed.
In this case, it returns wrong pt pointer and it has possibility to make crash.
So I add free pt code and return NULL code into _pool_tex_dynamic_new function.

2. I modified eng_image_data_get of gl engine.

If Evas_GL_Image's texture creation failed and evas_gl_image's cache image was droped,
Im->im can be NULL. So I add check code.
Example: evas_gl_common_image_content_hint_set
     1) EVAS_IMAGE_CONTENT_HINT_DYNAMIC , it drop cache image
     2) if evas_gl_common_texture_dynamic_new failed
     3) then, im->im =NULL, im->tex=NULL
        In this situation, if application call's evas_object_image_data_get function,
It make crash in evas_cache_image_load_data function.

3. I think function's related with evas_object's engine data have to be return NULL if it failed.
If function's returns null, evas object code can handle error more easily.
But evas object's code was implemented differently each case. Does my suggestion right?
I add engine data null check code to evas_object_image based on upper consumtion.
If it is wrong , the patch code related with evas object image have to be removed.
If it is right , I will survey other evas object type also.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@62775 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
src/lib/canvas/evas_object_image.c
src/modules/engines/gl_common/evas_gl_texture.c
src/modules/engines/gl_x11/evas_engine.c