Evas: Filter: More aggresively avoid allocing filter data.
authornash <nash@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 21 Apr 2011 06:01:53 +0000 (06:01 +0000)
committernash <nash@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 21 Apr 2011 06:01:53 +0000 (06:01 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@58774 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_filter.c

index 3c59404..21ab39c 100644 (file)
@@ -184,6 +184,9 @@ evas_object_filter_set(Evas_Object *o, Evas_Filter filter)
    if (((int)filter < (int)EVAS_FILTER_NONE) || (filter > EVAS_FILTER_LAST))
       return EINA_FALSE;
 
+   /* Don't alloc on no-op */
+   if (!o-filter && filter == EVAS_FILTER_NONE) return EINA_TRUE;
+
    if (!o->filter) filter_alloc(o);
    if (!o->filter) return EINA_FALSE;