{
Evas_Object_Image *o;
DATA32 *data;
+ void* result = NULL;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;
o->video.update_pixels(o->video.data, obj, &o->video);
if (o->cur.cspace == to_cspace) return NULL;
data = NULL;
- o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
- o->engine_data,
- 0,
- &data,
- &o->load_error);
- return evas_object_image_data_convert_internal(o, data, to_cspace);
-}
+ o->engine_data =
+ obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
+ o->engine_data, 0, &data,
+ &o->load_error);
+ result = evas_object_image_data_convert_internal(o, data, to_cspace);
+ if (o->engine_data)
+ {
+ o->engine_data =
+ obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output,
+ o->engine_data, data);
+ }
+ return result;
+}
EAPI void
evas_object_image_data_set(Evas_Object *obj, void *data)
{
if (data)
{
if (o->engine_data)
- o->engine_data = obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output,
- o->engine_data,
- data);
+ {
+ o->engine_data =
+ obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output,
+ o->engine_data,
+ data);
+ }
else
- o->engine_data = obj->layer->evas->engine.func->image_new_from_data(obj->layer->evas->engine.data.output,
- o->cur.image.w,
- o->cur.image.h,
- data,
- o->cur.has_alpha,
- o->cur.cspace);
+ {
+ o->engine_data =
+ obj->layer->evas->engine.func->image_new_from_data(obj->layer->evas->engine.data.output,
+ o->cur.image.w,
+ o->cur.image.h,
+ data,
+ o->cur.has_alpha,
+ o->cur.cspace);
+ }
if (o->engine_data)
{
int stride = 0;
obj->layer->evas->engine.func->image_content_hint_set
(obj->layer->evas->engine.data.output,
o->engine_data, o->content_hint);
- o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
- o->engine_data,
- for_writing,
- &data,
- &o->load_error);
+ o->engine_data =
+ obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
+ o->engine_data,
+ for_writing, &data,
+ &o->load_error);
/* if we fail to get engine_data, we have to return NULL */
if (!o->engine_data) return NULL;
if (o->engine_data)
obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output,
o->engine_data);
- o->engine_data = obj->layer->evas->engine.func->image_new_from_copied_data(obj->layer->evas->engine.data.output,
- o->cur.image.w,
- o->cur.image.h,
- data,
- o->cur.has_alpha,
- o->cur.cspace);
+ o->engine_data =
+ obj->layer->evas->engine.func->image_new_from_copied_data(obj->layer->evas->engine.data.output,
+ o->cur.image.w,
+ o->cur.image.h,
+ data,
+ o->cur.has_alpha,
+ o->cur.cspace);
if (o->engine_data)
{
int stride = 0;
- o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output,
- o->engine_data,
- o->cur.has_alpha);
+ o->engine_data =
+ obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output,
+ o->engine_data,
+ o->cur.has_alpha);
if (obj->layer->evas->engine.func->image_scale_hint_set)
obj->layer->evas->engine.func->image_scale_hint_set
(obj->layer->evas->engine.data.output,
{
int stride = 0;
- o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output,
- o->engine_data,
- o->cur.has_alpha);
+ o->engine_data =
+ obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output,
+ o->engine_data,
+ o->cur.has_alpha);
if (obj->layer->evas->engine.func->image_scale_hint_set)
obj->layer->evas->engine.func->image_scale_hint_set
(obj->layer->evas->engine.data.output,
evas_cache_image_drop(&im->cache_entry);
}
+ o->engine_data = obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output,
+ o->engine_data,
+ data);
return ok;
}
DATA32 *data;
int w, h, stride, iw, ih;
int a;
+ int return_value;
o = (Evas_Object_Image *)(obj->object_data);
0,
&data,
&o->load_error);
+
if (!data)
- return 0;
+ {
+ return_value = 0;
+ goto finish;
+ }
switch (o->cur.cspace)
{
a = (*((DATA8*)(data))) & 0x1f;
break;
default:
- return 1;
+ return_value = 1;
+ goto finish;
break;
}
- return (a != 0);
+ return_value = (a != 0);
+ goto finish;
+
+ finish:
+
+ obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output,
+ o->engine_data,
+ data);
+ return return_value;
}
static int