summaryrefslogtreecommitdiff
path: root/src/lib/evas/include/evas_filter.h
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-02-05 20:09:05 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-02-07 17:33:18 +0900
commit9d821a402a7938e316669d8e04fe673e06b32093 (patch)
tree4c29159a7a249a40780d37673b9ca21cea7aff09 /src/lib/evas/include/evas_filter.h
parenta25b212baca1afc0e2a5e0e85061493967bba4ff (diff)
Evas filters: Fix proxy usage (source unset)
Proxy sources & objects were not properly unset. This results either in crashes (especially in the Edje tests) or dangling objects with tons of references. Remove the refcount increase/decrease, as it is redundant. Store pairs proxy+source instead of just the source in all hashes, so we can unset the is_proxy flag on the proxy when there are no sources anymore.
Diffstat (limited to 'src/lib/evas/include/evas_filter.h')
-rw-r--r--src/lib/evas/include/evas_filter.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/evas/include/evas_filter.h b/src/lib/evas/include/evas_filter.h
index 453cd53d83..f569b6e9e5 100644
--- a/src/lib/evas/include/evas_filter.h
+++ b/src/lib/evas/include/evas_filter.h
@@ -9,6 +9,7 @@ typedef struct _Evas_Filter_Command Evas_Filter_Command;
9typedef struct _Evas_Filter_Program Evas_Filter_Program; 9typedef struct _Evas_Filter_Program Evas_Filter_Program;
10typedef struct _Evas_Filter_Instruction Evas_Filter_Instruction; 10typedef struct _Evas_Filter_Instruction Evas_Filter_Instruction;
11typedef struct _Evas_Filter_Buffer Evas_Filter_Buffer; 11typedef struct _Evas_Filter_Buffer Evas_Filter_Buffer;
12typedef struct _Evas_Filter_Proxy_Binding Evas_Filter_Proxy_Binding;
12typedef enum _Evas_Filter_Mode Evas_Filter_Mode; 13typedef enum _Evas_Filter_Mode Evas_Filter_Mode;
13typedef enum _Evas_Filter_Blur_Type Evas_Filter_Blur_Type; 14typedef enum _Evas_Filter_Blur_Type Evas_Filter_Blur_Type;
14typedef enum _Evas_Filter_Channel Evas_Filter_Channel; 15typedef enum _Evas_Filter_Channel Evas_Filter_Channel;
@@ -93,11 +94,10 @@ enum _Evas_Filter_Transform_Flags
93Evas_Filter_Program *evas_filter_program_new(const char *name); 94Evas_Filter_Program *evas_filter_program_new(const char *name);
94Eina_Bool evas_filter_program_parse(Evas_Filter_Program *pgm, const char *str); 95Eina_Bool evas_filter_program_parse(Evas_Filter_Program *pgm, const char *str);
95void evas_filter_program_del(Evas_Filter_Program *pgm); 96void evas_filter_program_del(Evas_Filter_Program *pgm);
96Eina_Bool evas_filter_context_program_use(Evas_Filter_Context *ctx, Evas_Object *eo_obj, Evas_Filter_Program *pgm); 97Eina_Bool evas_filter_context_program_use(Evas_Filter_Context *ctx, Evas_Filter_Program *pgm);
97Eina_Bool evas_filter_program_padding_get(Evas_Filter_Program *pgm, int *l, int *r, int *t, int *b); 98Eina_Bool evas_filter_program_padding_get(Evas_Filter_Program *pgm, int *l, int *r, int *t, int *b);
98void evas_filter_program_source_set(Evas_Filter_Program *pgm, const char *name, Evas_Object *object); 99//void evas_filter_program_source_set(Evas_Filter_Program *pgm, const char *name, Evas_Object *object);
99void evas_filter_program_source_set_all(Evas_Filter_Program *pgm, Eina_Hash *sources); 100void evas_filter_program_source_set_all(Evas_Filter_Program *pgm, Eina_Hash *sources);
100Evas_Object *evas_filter_program_source_get(Evas_Filter_Program *pgm, const char *name);
101void evas_filter_context_proxy_render_all(Evas_Filter_Context *ctx, Eo *eo_obj, Eina_Bool do_async); 101void evas_filter_context_proxy_render_all(Evas_Filter_Context *ctx, Eo *eo_obj, Eina_Bool do_async);
102 102
103/* Filter context (low level) */ 103/* Filter context (low level) */
@@ -240,5 +240,13 @@ int evas_filter_command_bump_map_add(Evas_Filter_Context *c
240 */ 240 */
241int evas_filter_command_transform_add(Evas_Filter_Context *ctx, void *draw_context, int inbuf, int outbuf, Evas_Filter_Transform_Flags flags, int ox, int oy); 241int evas_filter_command_transform_add(Evas_Filter_Context *ctx, void *draw_context, int inbuf, int outbuf, Evas_Filter_Transform_Flags flags, int ox, int oy);
242 242
243/* Simple binding between a filter object and its sources */
244struct _Evas_Filter_Proxy_Binding
245{
246 Evas_Object *eo_proxy;
247 Evas_Object *eo_source;
248 Eina_Stringshare *name;
249};
250
243#endif 251#endif
244 252