summaryrefslogtreecommitdiff
path: root/src/lib/evas/include/evas_filter.h
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-03-15 14:49:50 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-04-14 11:26:43 +0900
commit9b1ea2fc6b21be05c7959d2d14402310c9c68784 (patch)
treee7f31e0ac275964ed687c7ea0b33b9269ee60914 /src/lib/evas/include/evas_filter.h
parenta6951397f619d5f5c2491ec75f26b2facae476ff (diff)
evas: Pass obscuring region to the filters
This will be most useful in a special case, where a filter is used in a window decoration, applied to a snapshot object. Another optimization that might be wanted is passing a list of update regions (from the proxy or snapshot). The filters don't support the obscuring region yet, only some of the high-level logic is implemented.
Diffstat (limited to 'src/lib/evas/include/evas_filter.h')
-rw-r--r--src/lib/evas/include/evas_filter.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/evas/include/evas_filter.h b/src/lib/evas/include/evas_filter.h
index 533bc249b9..34a09c4fe3 100644
--- a/src/lib/evas/include/evas_filter.h
+++ b/src/lib/evas/include/evas_filter.h
@@ -36,6 +36,7 @@ typedef struct _Evas_Filter_Context Evas_Filter_Context;
36typedef struct _Evas_Filter_Instruction Evas_Filter_Instruction; 36typedef struct _Evas_Filter_Instruction Evas_Filter_Instruction;
37typedef struct _Evas_Filter_Buffer Evas_Filter_Buffer; 37typedef struct _Evas_Filter_Buffer Evas_Filter_Buffer;
38typedef struct _Evas_Filter_Proxy_Binding Evas_Filter_Proxy_Binding; 38typedef struct _Evas_Filter_Proxy_Binding Evas_Filter_Proxy_Binding;
39typedef struct _Evas_Filter_Padding Evas_Filter_Padding;
39typedef enum _Evas_Filter_Mode Evas_Filter_Mode; 40typedef enum _Evas_Filter_Mode Evas_Filter_Mode;
40typedef enum _Evas_Filter_Blur_Type Evas_Filter_Blur_Type; 41typedef enum _Evas_Filter_Blur_Type Evas_Filter_Blur_Type;
41typedef enum _Evas_Filter_Channel Evas_Filter_Channel; 42typedef enum _Evas_Filter_Channel Evas_Filter_Channel;
@@ -124,6 +125,12 @@ enum _Evas_Filter_Transform_Flags
124 EVAS_FILTER_TRANSFORM_VFLIP = 1 125 EVAS_FILTER_TRANSFORM_VFLIP = 1
125}; 126};
126 127
128/** @internal */
129struct _Evas_Filter_Padding
130{
131 int l, r, t, b;
132};
133
127#define EFL_CANVAS_FILTER_STATE_DEFAULT { {}, { 255, 255, 255, 255 }, { "default", 0.0 }, {}, 0, 0, 1.0, 0.0 } 134#define EFL_CANVAS_FILTER_STATE_DEFAULT { {}, { 255, 255, 255, 255 }, { "default", 0.0 }, {}, 0, 0, 1.0, 0.0 }
128 135
129/* Parser stuff (high level API) */ 136/* Parser stuff (high level API) */
@@ -131,7 +138,7 @@ EAPI Evas_Filter_Program *evas_filter_program_new(const char *name, Eina_Bool in
131EAPI Eina_Bool evas_filter_program_state_set(Evas_Filter_Program *pgm, const Efl_Canvas_Filter_State *state); 138EAPI Eina_Bool evas_filter_program_state_set(Evas_Filter_Program *pgm, const Efl_Canvas_Filter_State *state);
132EAPI Eina_Bool evas_filter_program_parse(Evas_Filter_Program *pgm, const char *str); 139EAPI Eina_Bool evas_filter_program_parse(Evas_Filter_Program *pgm, const char *str);
133EAPI void evas_filter_program_del(Evas_Filter_Program *pgm); 140EAPI void evas_filter_program_del(Evas_Filter_Program *pgm);
134EAPI Eina_Bool evas_filter_program_padding_get(Evas_Filter_Program *pgm, int *l, int *r, int *t, int *b); 141EAPI Eina_Bool evas_filter_program_padding_get(Evas_Filter_Program *pgm, Evas_Filter_Padding *final, Evas_Filter_Padding *calc);
135EAPI void evas_filter_program_source_set_all(Evas_Filter_Program *pgm, Eina_Hash *sources); 142EAPI void evas_filter_program_source_set_all(Evas_Filter_Program *pgm, Eina_Hash *sources);
136void evas_filter_program_data_set_all(Evas_Filter_Program *pgm, Eina_Inlist *data); 143void evas_filter_program_data_set_all(Evas_Filter_Program *pgm, Eina_Inlist *data);
137 144
@@ -145,6 +152,7 @@ void evas_filter_context_proxy_render_all(Evas_Filter_Contex
145void evas_filter_context_post_run_callback_set(Evas_Filter_Context *ctx, Evas_Filter_Cb cb, void *data); 152void evas_filter_context_post_run_callback_set(Evas_Filter_Context *ctx, Evas_Filter_Cb cb, void *data);
146#define evas_filter_context_autodestroy(ctx) evas_filter_context_post_run_callback_set(ctx, ((Evas_Filter_Cb) evas_filter_context_destroy), ctx) 153#define evas_filter_context_autodestroy(ctx) evas_filter_context_post_run_callback_set(ctx, ((Evas_Filter_Cb) evas_filter_context_destroy), ctx)
147Eina_Bool evas_filter_context_buffers_allocate_all(Evas_Filter_Context *ctx); 154Eina_Bool evas_filter_context_buffers_allocate_all(Evas_Filter_Context *ctx);
155void evas_filter_context_obscured_region_set(Evas_Filter_Context *ctx, Eina_Rectangle rect);
148 156
149int evas_filter_buffer_empty_new(Evas_Filter_Context *ctx, Eina_Bool alpha_only); 157int evas_filter_buffer_empty_new(Evas_Filter_Context *ctx, Eina_Bool alpha_only);
150void *evas_filter_buffer_backing_steal(Evas_Filter_Context *ctx, int bufid); 158void *evas_filter_buffer_backing_steal(Evas_Filter_Context *ctx, int bufid);