evas/evas3d: reset image properies if the image is used for scene.

This commit is contained in:
ChunEon Park 2014-05-12 19:52:02 +09:00
parent 676a42f4b7
commit d497cd4364
1 changed files with 10 additions and 4 deletions

View File

@ -785,13 +785,17 @@ EOLIAN static void
_evas_image_scene_set(Eo *eo_obj, Evas_Image_Data *o, Evas_3D_Scene *scene)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS);
Evas_Image_Load_Opts lo;
if (o->cur->scene == scene) return;
_evas_object_image_cleanup(eo_obj, obj, o);
if (o->cur->u.file || o->cur->key)
evas_object_image_file_set(eo_obj, NULL, NULL);
_image_init_set(NULL, NULL, NULL, eo_obj, obj, o, &lo);
o->engine_data = obj->layer->evas->engine.func->image_load(obj->layer->evas->engine.data.output,
o->cur->u.file,
o->cur->key,
&o->load_error,
&lo);
_image_done_set(eo_obj, obj, o);
if (scene) _3d_set(eo_obj, scene);
else _3d_unset(eo_obj, obj, o);
@ -975,6 +979,8 @@ _evas_image_size_set(Eo *eo_obj, Evas_Image_Data *o, int w, int h)
int stride = 0;
if (o->cur->scene) return;
_evas_object_image_cleanup(eo_obj, obj, o);
if (w < 1) w = 1;
if (h < 1) h = 1;