/* None */
{ NULL, 0, NULL, NULL, EINA_FALSE},
/* Blur */
- { gaussian_filter, sizeof(Evas_Filter_Info_Blur), blur_size_get,
- gaussian_key_get, EINA_TRUE },
+ { gaussian_filter, sizeof(Evas_Filter_Info_Blur), blur_size_get, gaussian_key_get, EINA_TRUE },
/* Negation */
{ negation_filter, 0, NULL, NULL, EINA_FALSE },
/* Sepia */
len = 1 + finfo->datasize;
key = malloc(len);
+ if (!key) return NULL;
if (finfo->datasize) memcpy(key, info->data, finfo->datasize);
key[finfo->datasize] = info->filter;
return key;
blur = info->data;
if (lenp) *lenp = 4;
- // FIXME: handle malloc fail
key = malloc(4);
+ if (!key) return NULL;
key[0] = EVAS_FILTER_BLUR;
key[1] = blur->quality * 255;
key[2] = blur->radius >> 8;
uint8_t *key;
if (obj->filter->key) free(obj->filter->key);
+ obj->filter->key = NULL;
+ obj->filter->len = 0;
key = evas_filter_key_get(obj->filter, &len);
- obj->filter->key = key;
- obj->filter->len = len;
- fi = obj->layer->evas->engine.func->image_filtered_get
- (o->engine_data, key, len);
- if (obj->filter->cached && fi != obj->filter->cached)
+ if (key)
{
- obj->layer->evas->engine.func->image_filtered_free
- (o->engine_data, obj->filter->cached);
- obj->filter->cached = NULL;
+ obj->filter->key = key;
+ obj->filter->len = len;
+ fi = obj->layer->evas->engine.func->image_filtered_get
+ (o->engine_data, key, len);
+ if (obj->filter->cached && fi != obj->filter->cached)
+ {
+ obj->layer->evas->engine.func->image_filtered_free
+ (o->engine_data, obj->filter->cached);
+ obj->filter->cached = NULL;
+ }
}
}
else if (obj->filter->cached)