summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile_Evas.am16
-rw-r--r--src/lib/evas/common/evas_font_compress.c4
-rw-r--r--src/lib/evas/filters/evas_filter.c78
-rw-r--r--src/lib/evas/filters/evas_filter_mask.c12
-rw-r--r--src/lib/evas/filters/evas_filter_private.h13
-rw-r--r--src/lib/evas/filters/evas_filter_transform.c4
-rw-r--r--src/lib/evas/include/evas_filter.h1
-rw-r--r--src/lib/evas/include/evas_private.h6
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c47
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine_filter.h8
-rw-r--r--src/modules/evas/engines/software_generic/filters/evas_filter_blend.c (renamed from src/lib/evas/filters/evas_filter_blend.c)50
-rw-r--r--src/static_libs/draw/draw.h9
-rw-r--r--src/static_libs/draw/draw_alpha_main.c8
-rw-r--r--src/static_libs/draw/draw_main.c12
14 files changed, 176 insertions, 92 deletions
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index a1f37892be..bb037ff373 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -592,7 +592,6 @@ lib/evas/common/evas_op_sub/op_sub_pixel_mask_i386.c
592lib_evas_libevas_la_SOURCES += \ 592lib_evas_libevas_la_SOURCES += \
593lib/evas/canvas/evas_filter_mixin.c \ 593lib/evas/canvas/evas_filter_mixin.c \
594lib/evas/filters/evas_filter.c \ 594lib/evas/filters/evas_filter.c \
595lib/evas/filters/evas_filter_blend.c \
596lib/evas/filters/evas_filter_blur.c \ 595lib/evas/filters/evas_filter_blur.c \
597lib/evas/filters/evas_filter_bump.c \ 596lib/evas/filters/evas_filter_bump.c \
598lib/evas/filters/evas_filter_curve.c \ 597lib/evas/filters/evas_filter_curve.c \
@@ -616,6 +615,10 @@ lib/evas/filters/blur/blur_box_rgba_i386.c \
616lib/evas/filters/blur/blur_box_rgba_sse3.c \ 615lib/evas/filters/blur/blur_box_rgba_sse3.c \
617lib/evas/filters/blur/blur_box_rgba_neon.c 616lib/evas/filters/blur/blur_box_rgba_neon.c
618 617
618GFX_FILTER_SW_FILES = \
619modules/evas/engines/software_generic/evas_engine_filter.h \
620modules/evas/engines/software_generic/filters/evas_filter_blend.c \
621$(NULL)
619 622
620### Engine Ector stuff 623### Engine Ector stuff
621 624
@@ -641,9 +644,11 @@ modules/evas/engines/software_generic/Evas_Engine_Software_Shared.h \
641modules/evas/engines/software_generic/evas_native_tbm.c \ 644modules/evas/engines/software_generic/evas_native_tbm.c \
642modules/evas/engines/software_generic/evas_native_dmabuf.c \ 645modules/evas/engines/software_generic/evas_native_dmabuf.c \
643modules/evas/engines/software_generic/evas_ector_software_buffer.c \ 646modules/evas/engines/software_generic/evas_ector_software_buffer.c \
644modules/evas/engines/software_generic/evas_native_common.h 647modules/evas/engines/software_generic/evas_native_common.h \
648$(GFX_FILTER_SW_FILES)
645lib_evas_libevas_la_LIBADD += 649lib_evas_libevas_la_LIBADD +=
646lib_evas_libevas_la_CPPFLAGS += -I$(top_srcdir)/src/lib/ector 650lib_evas_libevas_la_CPPFLAGS += -I$(top_srcdir)/src/lib/ector \
651-I$(top_srcdir)/src/lib/evas/filters
647else 652else
648enginesoftwaregenericpkgdir = $(libdir)/evas/modules/engines/software_generic/$(MODULE_ARCH) 653enginesoftwaregenericpkgdir = $(libdir)/evas/modules/engines/software_generic/$(MODULE_ARCH)
649enginesoftwaregenericpkg_LTLIBRARIES = modules/evas/engines/software_generic/module.la 654enginesoftwaregenericpkg_LTLIBRARIES = modules/evas/engines/software_generic/module.la
@@ -660,10 +665,13 @@ modules/evas/engines/software_generic/Evas_Engine_Software_Shared.h \
660modules/evas/engines/software_generic/evas_native_tbm.c \ 665modules/evas/engines/software_generic/evas_native_tbm.c \
661modules/evas/engines/software_generic/evas_native_dmabuf.c \ 666modules/evas/engines/software_generic/evas_native_dmabuf.c \
662modules/evas/engines/software_generic/evas_ector_software_buffer.c \ 667modules/evas/engines/software_generic/evas_ector_software_buffer.c \
663modules/evas/engines/software_generic/evas_native_common.h 668modules/evas/engines/software_generic/evas_native_common.h \
669$(GFX_FILTER_SW_FILES)
670
664modules_evas_engines_software_generic_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ 671modules_evas_engines_software_generic_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
665-I$(top_srcdir)/src/lib/evas/include \ 672-I$(top_srcdir)/src/lib/evas/include \
666-I$(top_srcdir)/src/lib/evas/cserve2 \ 673-I$(top_srcdir)/src/lib/evas/cserve2 \
674-I$(top_srcdir)/src/lib/evas/filters \
667-I$(top_builddir)/src/modules/evas/engines/software_generic \ 675-I$(top_builddir)/src/modules/evas/engines/software_generic \
668@EVAS_CFLAGS@ 676@EVAS_CFLAGS@
669modules_evas_engines_software_generic_module_la_LIBADD = @USE_EVAS_LIBS@ 677modules_evas_engines_software_generic_module_la_LIBADD = @USE_EVAS_LIBS@
diff --git a/src/lib/evas/common/evas_font_compress.c b/src/lib/evas/common/evas_font_compress.c
index e923e17251..3a0e90c64f 100644
--- a/src/lib/evas/common/evas_font_compress.c
+++ b/src/lib/evas/common/evas_font_compress.c
@@ -508,8 +508,8 @@ evas_common_font_glyph_draw(RGBA_Font_Glyph *fg,
508 // FIXME: Font draw not optimized for Alpha targets! SLOW! 508 // FIXME: Font draw not optimized for Alpha targets! SLOW!
509 // This is not pretty :) 509 // This is not pretty :)
510 510
511 Alpha_Gfx_Func func;
512 DATA8 *src8, *dst8; 511 DATA8 *src8, *dst8;
512 Draw_Func_Alpha func;
513 int row; 513 int row;
514 514
515 if (EINA_UNLIKELY(x < 0)) 515 if (EINA_UNLIKELY(x < 0))
@@ -534,7 +534,7 @@ evas_common_font_glyph_draw(RGBA_Font_Glyph *fg,
534 { 534 {
535 DATA8 *d = dst8 + ((row - y1) * dst_pitch); 535 DATA8 *d = dst8 + ((row - y1) * dst_pitch);
536 DATA8 *s = src8 + (row * w) + x1; 536 DATA8 *s = src8 + (row * w) + x1;
537 func(s, d, x2 - x1); 537 func(d, s, x2 - x1);
538 } 538 }
539 free(src8); 539 free(src8);
540 } 540 }
diff --git a/src/lib/evas/filters/evas_filter.c b/src/lib/evas/filters/evas_filter.c
index 9438a4e98a..5ff5a7b6ca 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -61,6 +61,7 @@ evas_filter_context_new(Evas_Public_Data *evas, Eina_Bool async, void *user_data
61 ctx->evas = evas; 61 ctx->evas = evas;
62 ctx->async = async; 62 ctx->async = async;
63 ctx->user_data = user_data; 63 ctx->user_data = user_data;
64 ctx->buffer_scaled_get = &evas_filter_buffer_scaled_get;
64 65
65 return ctx; 66 return ctx;
66} 67}
@@ -1489,8 +1490,19 @@ _filter_name_get(int mode)
1489#endif 1490#endif
1490 1491
1491static Eina_Bool 1492static Eina_Bool
1493_engine_gfx_filter_func(Evas_Filter_Command *cmd)
1494{
1495 // This should be temporary porting code, when moving filter implementations
1496 // from here to the engine. Ideally the filters should be in ector though.
1497
1498 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->ENFN->gfx_filter_process, EINA_FALSE);
1499 return cmd->ENFN->gfx_filter_process(cmd->ENDT, cmd);
1500}
1501
1502static Eina_Bool
1492_filter_command_run(Evas_Filter_Command *cmd) 1503_filter_command_run(Evas_Filter_Command *cmd)
1493{ 1504{
1505 Evas_Filter_Support support = EVAS_FILTER_SUPPORT_NONE;
1494 Evas_Filter_Apply_Func func = NULL; 1506 Evas_Filter_Apply_Func func = NULL;
1495 1507
1496 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->output, EINA_FALSE); 1508 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->output, EINA_FALSE);
@@ -1515,41 +1527,43 @@ _filter_command_run(Evas_Filter_Command *cmd)
1515 return EINA_FALSE; 1527 return EINA_FALSE;
1516 } 1528 }
1517 1529
1518 //func = cmd->ENFN->filter_command_func_get(cmd); 1530 if (cmd->ENFN->gfx_filter_supports)
1519 // FIXME: Must call engine function, not CPU directly. 1531 support = cmd->ENFN->gfx_filter_supports(cmd->ENDT, cmd);
1520 1532
1521 switch (cmd->mode) 1533 if (support != EVAS_FILTER_SUPPORT_NONE)
1522 { 1534 {
1523 case EVAS_FILTER_MODE_BLEND: 1535 func = &_engine_gfx_filter_func;
1524 func = evas_filter_blend_cpu_func_get(cmd); 1536 }
1525 break; 1537 else
1526 case EVAS_FILTER_MODE_BLUR: 1538 {
1527 func = evas_filter_blur_cpu_func_get(cmd); 1539 switch (cmd->mode)
1528 break; 1540 {
1529 case EVAS_FILTER_MODE_CURVE: 1541 case EVAS_FILTER_MODE_BLUR:
1530 func = evas_filter_curve_cpu_func_get(cmd); 1542 func = evas_filter_blur_cpu_func_get(cmd);
1531 break; 1543 break;
1532 case EVAS_FILTER_MODE_DISPLACE: 1544 case EVAS_FILTER_MODE_CURVE:
1533 func = evas_filter_displace_cpu_func_get(cmd); 1545 func = evas_filter_curve_cpu_func_get(cmd);
1534 break; 1546 break;
1535 case EVAS_FILTER_MODE_FILL: 1547 case EVAS_FILTER_MODE_DISPLACE:
1536 func = evas_filter_fill_cpu_func_get(cmd); 1548 func = evas_filter_displace_cpu_func_get(cmd);
1537 break; 1549 break;
1538 case EVAS_FILTER_MODE_MASK: 1550 case EVAS_FILTER_MODE_FILL:
1539 func = evas_filter_mask_cpu_func_get(cmd); 1551 func = evas_filter_fill_cpu_func_get(cmd);
1540 break; 1552 break;
1541 case EVAS_FILTER_MODE_BUMP: 1553 case EVAS_FILTER_MODE_MASK:
1542 func = evas_filter_bump_map_cpu_func_get(cmd); 1554 func = evas_filter_mask_cpu_func_get(cmd);
1543 break; 1555 break;
1544 case EVAS_FILTER_MODE_TRANSFORM: 1556 case EVAS_FILTER_MODE_BUMP:
1545 func = evas_filter_transform_cpu_func_get(cmd); 1557 func = evas_filter_bump_map_cpu_func_get(cmd);
1546 break; 1558 break;
1547 default: 1559 case EVAS_FILTER_MODE_TRANSFORM:
1548 CRI("Invalid filter mode."); 1560 func = evas_filter_transform_cpu_func_get(cmd);
1549 break; 1561 break;
1562 default:
1563 CRI("Invalid filter mode.");
1564 break;
1565 }
1550 } 1566 }
1551
1552 // END OF FIXME
1553 1567
1554 if (!func) 1568 if (!func)
1555 { 1569 {
diff --git a/src/lib/evas/filters/evas_filter_mask.c b/src/lib/evas/filters/evas_filter_mask.c
index c13493cbf2..230cb3269c 100644
--- a/src/lib/evas/filters/evas_filter_mask.c
+++ b/src/lib/evas/filters/evas_filter_mask.c
@@ -67,7 +67,7 @@ _mask_cpu_alpha_alpha_alpha(Evas_Filter_Command *cmd)
67 unsigned int src_len = 0, src_stride, msk_len = 0, msk_stride, dst_len = 0, dst_stride; 67 unsigned int src_len = 0, src_stride, msk_len = 0, msk_stride, dst_len = 0, dst_stride;
68 Efl_Gfx_Render_Op render_op = cmd->draw.rop; 68 Efl_Gfx_Render_Op render_op = cmd->draw.rop;
69 Evas_Filter_Buffer *msk_fb; 69 Evas_Filter_Buffer *msk_fb;
70 Alpha_Gfx_Func func; 70 Draw_Func_Alpha func;
71 uint8_t *src_map = NULL, *dst, *dst_map = NULL, *msk, *msk_map = NULL; 71 uint8_t *src_map = NULL, *dst, *dst_map = NULL, *msk, *msk_map = NULL;
72 int w, h, mw, mh, x, y, my; 72 int w, h, mw, mh, x, y, my;
73 int stepsize, stepcount, step; 73 int stepsize, stepcount, step;
@@ -134,12 +134,12 @@ _mask_cpu_alpha_alpha_alpha(Evas_Filter_Command *cmd)
134 dst = dst_map + (y * dst_stride); 134 dst = dst_map + (y * dst_stride);
135 135
136 for (step = 0; step < stepcount; step++, dst += stepsize) 136 for (step = 0; step < stepcount; step++, dst += stepsize)
137 func(msk, dst, stepsize); 137 func(dst, msk, stepsize);
138 138
139 x = stepsize * stepcount; 139 x = stepsize * stepcount;
140 if (x < w) 140 if (x < w)
141 { 141 {
142 func(msk, dst, w - x); 142 func(dst, msk, w - x);
143 } 143 }
144 } 144 }
145 145
@@ -274,7 +274,7 @@ _mask_cpu_alpha_alpha_rgba(Evas_Filter_Command *cmd)
274 uint8_t *src, *msk, *span, *src_map = NULL, *msk_map = NULL, *dst_map = NULL; 274 uint8_t *src, *msk, *span, *src_map = NULL, *msk_map = NULL, *dst_map = NULL;
275 Evas_Filter_Buffer *msk_fb; 275 Evas_Filter_Buffer *msk_fb;
276 RGBA_Gfx_Func func; 276 RGBA_Gfx_Func func;
277 Alpha_Gfx_Func span_func; 277 Draw_Func_Alpha span_func;
278 uint32_t *dst; 278 uint32_t *dst;
279 uint32_t color; 279 uint32_t color;
280 Efl_Gfx_Render_Op op = cmd->draw.rop; 280 Efl_Gfx_Render_Op op = cmd->draw.rop;
@@ -335,7 +335,7 @@ _mask_cpu_alpha_alpha_rgba(Evas_Filter_Command *cmd)
335 for (step = 0; step < stepcount; step++, dst += stepsize, src += stepsize) 335 for (step = 0; step < stepcount; step++, dst += stepsize, src += stepsize)
336 { 336 {
337 memcpy(span, msk, stepsize * sizeof(uint8_t)); 337 memcpy(span, msk, stepsize * sizeof(uint8_t));
338 span_func(src, span, stepsize); 338 span_func(span, src, stepsize);
339 func(NULL, span, color, dst, stepsize); 339 func(NULL, span, color, dst, stepsize);
340 } 340 }
341 341
@@ -343,7 +343,7 @@ _mask_cpu_alpha_alpha_rgba(Evas_Filter_Command *cmd)
343 if (x < w) 343 if (x < w)
344 { 344 {
345 memcpy(span, msk, (w - x) * sizeof(uint8_t)); 345 memcpy(span, msk, (w - x) * sizeof(uint8_t));
346 span_func(src, span, w - x); 346 span_func(span, src, w - x);
347 func(NULL, span, color, dst, w -x); 347 func(NULL, span, color, dst, w -x);
348 } 348 }
349 } 349 }
diff --git a/src/lib/evas/filters/evas_filter_private.h b/src/lib/evas/filters/evas_filter_private.h
index c9be59e3a6..f659daa5eb 100644
--- a/src/lib/evas/filters/evas_filter_private.h
+++ b/src/lib/evas/filters/evas_filter_private.h
@@ -109,6 +109,8 @@ extern int _evas_filter_log_dom;
109 109
110typedef enum _Evas_Filter_Interpolation_Mode Evas_Filter_Interpolation_Mode; 110typedef enum _Evas_Filter_Interpolation_Mode Evas_Filter_Interpolation_Mode;
111 111
112typedef Evas_Filter_Buffer * (*evas_filter_buffer_scaled_get_func)(Evas_Filter_Context *ctx, Evas_Filter_Buffer *src, unsigned w, unsigned h);
113
112struct _Evas_Filter_Context 114struct _Evas_Filter_Context
113{ 115{
114 Evas_Public_Data *evas; 116 Evas_Public_Data *evas;
@@ -118,6 +120,9 @@ struct _Evas_Filter_Context
118 int last_command_id; 120 int last_command_id;
119 void *user_data; // used by textblock 121 void *user_data; // used by textblock
120 122
123 // ugly hack (dlsym fail)
124 evas_filter_buffer_scaled_get_func buffer_scaled_get;
125
121 // Variables changing at each run 126 // Variables changing at each run
122 int w, h; // Dimensions of the input/output buffers 127 int w, h; // Dimensions of the input/output buffers
123 int padl, padt, padr, padb; // Padding in the current input/output buffers 128 int padl, padt, padr, padb; // Padding in the current input/output buffers
@@ -245,11 +250,17 @@ enum _Evas_Filter_Interpolation_Mode
245 EVAS_FILTER_INTERPOLATION_MODE_LINEAR 250 EVAS_FILTER_INTERPOLATION_MODE_LINEAR
246}; 251};
247 252
253enum _Evas_Filter_Support
254{
255 EVAS_FILTER_SUPPORT_NONE = 0,
256 EVAS_FILTER_SUPPORT_CPU,
257 EVAS_FILTER_SUPPORT_GL
258};
259
248void evas_filter_context_clear(Evas_Filter_Context *ctx); 260void evas_filter_context_clear(Evas_Filter_Context *ctx);
249void evas_filter_context_source_set(Evas_Filter_Context *ctx, Evas_Object *eo_proxy, Evas_Object *eo_source, int bufid, Eina_Stringshare *name); 261void evas_filter_context_source_set(Evas_Filter_Context *ctx, Evas_Object *eo_proxy, Evas_Object *eo_source, int bufid, Eina_Stringshare *name);
250 262
251/* FIXME: CPU filters entry points. Move these to the Evas Engine itself. */ 263/* FIXME: CPU filters entry points. Move these to the Evas Engine itself. */
252Evas_Filter_Apply_Func evas_filter_blend_cpu_func_get(Evas_Filter_Command *cmd);
253Evas_Filter_Apply_Func evas_filter_blur_cpu_func_get(Evas_Filter_Command *cmd); 264Evas_Filter_Apply_Func evas_filter_blur_cpu_func_get(Evas_Filter_Command *cmd);
254Evas_Filter_Apply_Func evas_filter_bump_map_cpu_func_get(Evas_Filter_Command *cmd); 265Evas_Filter_Apply_Func evas_filter_bump_map_cpu_func_get(Evas_Filter_Command *cmd);
255Evas_Filter_Apply_Func evas_filter_curve_cpu_func_get(Evas_Filter_Command *cmd); 266Evas_Filter_Apply_Func evas_filter_curve_cpu_func_get(Evas_Filter_Command *cmd);
diff --git a/src/lib/evas/filters/evas_filter_transform.c b/src/lib/evas/filters/evas_filter_transform.c
index 0cc3b2d966..db90147970 100644
--- a/src/lib/evas/filters/evas_filter_transform.c
+++ b/src/lib/evas/filters/evas_filter_transform.c
@@ -72,7 +72,7 @@ _vflip_cpu(Evas_Filter_Command *cmd)
72 else if (cspace == E_ALPHA) 72 else if (cspace == E_ALPHA)
73 { 73 {
74 /* blend onto a target (alpha -> alpha) */ 74 /* blend onto a target (alpha -> alpha) */
75 Alpha_Gfx_Func func = efl_draw_alpha_func_get(cmd->draw.rop, EINA_FALSE); 75 Draw_Func_Alpha func = efl_draw_alpha_func_get(cmd->draw.rop, EINA_FALSE);
76 EINA_SAFETY_ON_NULL_GOTO(func, end); 76 EINA_SAFETY_ON_NULL_GOTO(func, end);
77 77
78 for (sy = s0, dy = d0; (dy >= d1) && (sy <= s1); sy++, dy--) 78 for (sy = s0, dy = d0; (dy >= d1) && (sy <= s1); sy++, dy--)
@@ -80,7 +80,7 @@ _vflip_cpu(Evas_Filter_Command *cmd)
80 uint8_t* src = in + src_stride * sy; 80 uint8_t* src = in + src_stride * sy;
81 uint8_t* dst = out + dst_stride * dy; 81 uint8_t* dst = out + dst_stride * dy;
82 82
83 func(src, dst, w); 83 func(dst, src, w);
84 } 84 }
85 } 85 }
86 else 86 else
diff --git a/src/lib/evas/include/evas_filter.h b/src/lib/evas/include/evas_filter.h
index c8962c434d..0c87af23f4 100644
--- a/src/lib/evas/include/evas_filter.h
+++ b/src/lib/evas/include/evas_filter.h
@@ -33,7 +33,6 @@
33#endif /* ! _WIN32 */ 33#endif /* ! _WIN32 */
34 34
35typedef struct _Evas_Filter_Context Evas_Filter_Context; 35typedef struct _Evas_Filter_Context Evas_Filter_Context;
36typedef struct _Evas_Filter_Command Evas_Filter_Command;
37typedef struct _Evas_Filter_Instruction Evas_Filter_Instruction; 36typedef struct _Evas_Filter_Instruction Evas_Filter_Instruction;
38typedef struct _Evas_Filter_Buffer Evas_Filter_Buffer; 37typedef struct _Evas_Filter_Buffer Evas_Filter_Buffer;
39typedef struct _Evas_Filter_Proxy_Binding Evas_Filter_Proxy_Binding; 38typedef struct _Evas_Filter_Proxy_Binding Evas_Filter_Proxy_Binding;
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 4491af676a..4d6f608ac8 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -91,10 +91,13 @@ typedef struct _Evas_Smart_Data Evas_Smart_Data;
91typedef struct _Evas_Object_Protected_State Evas_Object_Protected_State; 91typedef struct _Evas_Object_Protected_State Evas_Object_Protected_State;
92typedef struct _Evas_Object_Protected_Data Evas_Object_Protected_Data; 92typedef struct _Evas_Object_Protected_Data Evas_Object_Protected_Data;
93 93
94/* gfx filters typedef only */
94typedef struct _Evas_Filter_Program Evas_Filter_Program; 95typedef struct _Evas_Filter_Program Evas_Filter_Program;
95typedef struct _Evas_Object_Filter_Data Evas_Object_Filter_Data; 96typedef struct _Evas_Object_Filter_Data Evas_Object_Filter_Data;
96typedef struct _Evas_Filter_Data_Binding Evas_Filter_Data_Binding; 97typedef struct _Evas_Filter_Data_Binding Evas_Filter_Data_Binding;
97typedef struct _Evas_Pointer_Data Evas_Pointer_Data; 98typedef struct _Evas_Pointer_Data Evas_Pointer_Data;
99typedef struct _Evas_Filter_Command Evas_Filter_Command;
100typedef enum _Evas_Filter_Support Evas_Filter_Support;
98 101
99// 3D stuff 102// 3D stuff
100 103
@@ -1576,6 +1579,9 @@ struct _Evas_Func
1576 void (*ector_end) (void *data, void *context, Ector_Surface *ector, void *surface, void *engine_data, Eina_Bool do_async); 1579 void (*ector_end) (void *data, void *context, Ector_Surface *ector, void *surface, void *engine_data, Eina_Bool do_async);
1577 void* (*ector_new) (void *data, void *context, Ector_Surface *ector, void *surface); 1580 void* (*ector_new) (void *data, void *context, Ector_Surface *ector, void *surface);
1578 void (*ector_free) (void *engine_data); 1581 void (*ector_free) (void *engine_data);
1582
1583 Evas_Filter_Support (*gfx_filter_supports) (void *data, Evas_Filter_Command *cmd);
1584 Eina_Bool (*gfx_filter_process) (void *data, Evas_Filter_Command *cmd);
1579}; 1585};
1580 1586
1581struct _Evas_Image_Save_Func 1587struct _Evas_Image_Save_Func
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index e509ea3a36..37fa1b98d0 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -12,6 +12,7 @@
12#include "evas_ector_buffer.eo.h" 12#include "evas_ector_buffer.eo.h"
13#include "evas_ector_software_buffer.eo.h" 13#include "evas_ector_software_buffer.eo.h"
14#include "draw.h" 14#include "draw.h"
15#include "evas_filter_private.h"
15 16
16#if defined HAVE_DLSYM && ! defined _WIN32 17#if defined HAVE_DLSYM && ! defined _WIN32
17# include <dlfcn.h> /* dlopen,dlclose,etc */ 18# include <dlfcn.h> /* dlopen,dlclose,etc */
@@ -28,6 +29,7 @@
28 29
29#include "Evas_Engine_Software_Generic.h" 30#include "Evas_Engine_Software_Generic.h"
30#include "evas_native_common.h" 31#include "evas_native_common.h"
32#include "evas_engine_filter.h"
31 33
32#ifdef EVAS_GL 34#ifdef EVAS_GL
33//----------------------------------// 35//----------------------------------//
@@ -4618,6 +4620,47 @@ eng_ector_end(void *data EINA_UNUSED, void *context EINA_UNUSED, Ector_Surface *
4618 4620
4619//------------------------------------------------// 4621//------------------------------------------------//
4620 4622
4623static Evas_Filter_Apply_Func
4624_gfx_filter_func_get(Evas_Filter_Command *cmd)
4625{
4626 Evas_Filter_Apply_Func func = NULL;
4627
4628 switch (cmd->mode)
4629 {
4630 case EVAS_FILTER_MODE_BLEND:
4631 func = eng_filter_blend_func_get(cmd);
4632 break;
4633 default:
4634 return NULL;
4635 }
4636
4637 return func;
4638}
4639
4640static Evas_Filter_Support
4641eng_gfx_filter_supports(void *data EINA_UNUSED, Evas_Filter_Command *cmd)
4642{
4643 if (!_gfx_filter_func_get(cmd))
4644 return EVAS_FILTER_SUPPORT_NONE;
4645
4646 return EVAS_FILTER_SUPPORT_CPU;
4647}
4648
4649static Eina_Bool
4650eng_gfx_filter_process(void *data EINA_UNUSED, Evas_Filter_Command *cmd)
4651{
4652 Evas_Filter_Apply_Func func;
4653
4654 func = _gfx_filter_func_get(cmd);
4655 EINA_SAFETY_ON_NULL_RETURN_VAL(func, EINA_FALSE);
4656
4657 return func(cmd);
4658}
4659
4660#undef FINDSYM
4661
4662//------------------------------------------------//
4663
4621/* 4664/*
4622 ***** 4665 *****
4623 ** 4666 **
@@ -4818,7 +4861,9 @@ static Evas_Func func =
4818 eng_ector_renderer_draw, 4861 eng_ector_renderer_draw,
4819 eng_ector_end, 4862 eng_ector_end,
4820 eng_ector_new, 4863 eng_ector_new,
4821 eng_ector_free 4864 eng_ector_free,
4865 eng_gfx_filter_supports,
4866 eng_gfx_filter_process
4822 /* FUTURE software generic calls go here */ 4867 /* FUTURE software generic calls go here */
4823}; 4868};
4824 4869
diff --git a/src/modules/evas/engines/software_generic/evas_engine_filter.h b/src/modules/evas/engines/software_generic/evas_engine_filter.h
new file mode 100644
index 0000000000..2b2c81d414
--- /dev/null
+++ b/src/modules/evas/engines/software_generic/evas_engine_filter.h
@@ -0,0 +1,8 @@
1#ifndef EVAS_ENGINE_FILTER_H
2#define EVAS_ENGINE_FILTER_H
3
4#include "evas_filter_private.h"
5
6Evas_Filter_Apply_Func eng_filter_blend_func_get(Evas_Filter_Command *cmd);
7
8#endif // EVAS_ENGINE_FILTER_H
diff --git a/src/lib/evas/filters/evas_filter_blend.c b/src/modules/evas/engines/software_generic/filters/evas_filter_blend.c
index a8191e693d..be43af9203 100644
--- a/src/lib/evas/filters/evas_filter_blend.c
+++ b/src/modules/evas/engines/software_generic/filters/evas_filter_blend.c
@@ -1,6 +1,4 @@
1#include "evas_filter.h" 1#include "../evas_engine_filter.h"
2#include "evas_filter_private.h"
3#include "evas_blend_private.h"
4#include "ector_buffer.h" 2#include "ector_buffer.h"
5#include "draw.h" 3#include "draw.h"
6 4
@@ -32,7 +30,7 @@ _image_draw_cpu_alpha_alpha(void *data EINA_UNUSED, void *context,
32 struct Filter_Blend_Draw_Context *dc = context; 30 struct Filter_Blend_Draw_Context *dc = context;
33 const uint8_t *srcdata = src_map; 31 const uint8_t *srcdata = src_map;
34 uint8_t *dstdata = dst_map; 32 uint8_t *dstdata = dst_map;
35 Alpha_Gfx_Func func; 33 Draw_Func_Alpha func;
36 int y, sw, dw; 34 int y, sw, dw;
37 35
38 EINA_SAFETY_ON_FALSE_RETURN_VAL((src_w == dst_w) && (src_h == dst_h), EINA_FALSE); 36 EINA_SAFETY_ON_FALSE_RETURN_VAL((src_w == dst_w) && (src_h == dst_h), EINA_FALSE);
@@ -47,7 +45,7 @@ _image_draw_cpu_alpha_alpha(void *data EINA_UNUSED, void *context,
47 dstdata += dst_y * dw; 45 dstdata += dst_y * dw;
48 for (y = src_h; y; y--) 46 for (y = src_h; y; y--)
49 { 47 {
50 func((uint8_t *) srcdata + src_x, dstdata + dst_x, src_w); 48 func(dstdata + dst_x, srcdata + src_x, src_w);
51 srcdata += sw; 49 srcdata += sw;
52 dstdata += dw; 50 dstdata += dw;
53 } 51 }
@@ -67,12 +65,12 @@ _image_draw_cpu_alpha_rgba(void *data EINA_UNUSED, void *context,
67 struct Filter_Blend_Draw_Context *dc = context; 65 struct Filter_Blend_Draw_Context *dc = context;
68 uint8_t *srcdata = (uint8_t *) src_map; 66 uint8_t *srcdata = (uint8_t *) src_map;
69 uint32_t *dstdata = dst_map; 67 uint32_t *dstdata = dst_map;
70 RGBA_Gfx_Func func; 68 RGBA_Comp_Func_Mask func;
71 int y, sw, dw; 69 int y, sw, dw;
72 70
73 EINA_SAFETY_ON_FALSE_RETURN_VAL((src_w == dst_w) && (src_h == dst_h), EINA_FALSE); 71 EINA_SAFETY_ON_FALSE_RETURN_VAL((src_w == dst_w) && (src_h == dst_h), EINA_FALSE);
74 72
75 func = evas_common_gfx_func_composite_mask_color_span_get(dc->color, 1, 1, _gfx_to_evas_render_op(dc->rop)); 73 func = efl_draw_func_mask_span_get(dc->rop, dc->color);
76 EINA_SAFETY_ON_NULL_RETURN_VAL(func, EINA_FALSE); 74 EINA_SAFETY_ON_NULL_RETURN_VAL(func, EINA_FALSE);
77 75
78 sw = LINELEN(src_stride, srcdata); 76 sw = LINELEN(src_stride, srcdata);
@@ -82,7 +80,7 @@ _image_draw_cpu_alpha_rgba(void *data EINA_UNUSED, void *context,
82 dstdata += dst_y * dw; 80 dstdata += dst_y * dw;
83 for (y = src_h; y; y--) 81 for (y = src_h; y; y--)
84 { 82 {
85 func(NULL, srcdata + src_x, dc->color, dstdata + dst_x, src_w); 83 func(dstdata + dst_x, srcdata + src_x, src_w, dc->color);
86 srcdata += sw; 84 srcdata += sw;
87 dstdata += dw; 85 dstdata += dw;
88 } 86 }
@@ -102,17 +100,15 @@ _image_draw_cpu_rgba_rgba(void *data EINA_UNUSED, void *context,
102 struct Filter_Blend_Draw_Context *dc = context; 100 struct Filter_Blend_Draw_Context *dc = context;
103 uint32_t *srcdata = (uint32_t *) src_map; 101 uint32_t *srcdata = (uint32_t *) src_map;
104 uint32_t *dstdata = dst_map; 102 uint32_t *dstdata = dst_map;
105 RGBA_Gfx_Func func; 103 RGBA_Comp_Func func;
106 int y, sw, dw; 104 int y, sw, dw;
107 105
108 EINA_SAFETY_ON_FALSE_RETURN_VAL((src_w == dst_w) && (src_h == dst_h), EINA_FALSE); 106 EINA_SAFETY_ON_FALSE_RETURN_VAL((src_w == dst_w) && (src_h == dst_h), EINA_FALSE);
109 107
110 if (!dc->color) 108 if (!dc->color)
111 return EINA_TRUE; 109 return EINA_TRUE;
112 else if (dc->color == 0xFFFFFFFF)
113 func = evas_common_gfx_func_composite_pixel_span_get(1, 0, 1, 1, _gfx_to_evas_render_op(dc->rop));
114 else 110 else
115 func = evas_common_gfx_func_composite_pixel_color_span_get(1, 0, dc->color, 1, 1, _gfx_to_evas_render_op(dc->rop)); 111 func = efl_draw_func_span_get(dc->rop, dc->color, EINA_TRUE);
116 EINA_SAFETY_ON_NULL_RETURN_VAL(func, EINA_FALSE); 112 EINA_SAFETY_ON_NULL_RETURN_VAL(func, EINA_FALSE);
117 113
118 sw = LINELEN(src_stride, srcdata); 114 sw = LINELEN(src_stride, srcdata);
@@ -122,7 +118,7 @@ _image_draw_cpu_rgba_rgba(void *data EINA_UNUSED, void *context,
122 dstdata += dst_y * dw; 118 dstdata += dst_y * dw;
123 for (y = src_h; y; y--) 119 for (y = src_h; y; y--)
124 { 120 {
125 func(srcdata + src_x, NULL, dc->color, dstdata + dst_x, src_w); 121 func(dstdata + dst_x, srcdata + src_x, src_w, dc->color, 255);
126 srcdata += sw; 122 srcdata += sw;
127 dstdata += dw; 123 dstdata += dw;
128 } 124 }
@@ -158,6 +154,8 @@ _image_draw_cpu_rgba_alpha(void *data EINA_UNUSED, void *context EINA_UNUSED,
158 sw = LINELEN(src_stride, srcdata); 154 sw = LINELEN(src_stride, srcdata);
159 dw = LINELEN(dst_stride, dstdata); 155 dw = LINELEN(dst_stride, dstdata);
160 156
157 /* FIXME: no draw function here? */
158
161 srcdata += src_y * sw; 159 srcdata += src_y * sw;
162 dstdata += dst_y * dw; 160 dstdata += dst_y * dw;
163 for (y = src_h; y; y--) 161 for (y = src_h; y; y--)
@@ -203,6 +201,7 @@ _filter_blend_cpu_generic_do(Evas_Filter_Command *cmd, draw_func image_draw)
203 201
204 if ((sw != dw || sh != dh) && (cmd->draw.fillmode & EVAS_FILTER_FILL_MODE_STRETCH_XY)) 202 if ((sw != dw || sh != dh) && (cmd->draw.fillmode & EVAS_FILTER_FILL_MODE_STRETCH_XY))
205 { 203 {
204 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->ctx->buffer_scaled_get, EINA_FALSE);
206 205
207 if (cmd->draw.fillmode & EVAS_FILTER_FILL_MODE_STRETCH_X) 206 if (cmd->draw.fillmode & EVAS_FILTER_FILL_MODE_STRETCH_X)
208 sw = dw; 207 sw = dw;
@@ -210,7 +209,7 @@ _filter_blend_cpu_generic_do(Evas_Filter_Command *cmd, draw_func image_draw)
210 sh = dh; 209 sh = dh;
211 210
212 BUFFERS_LOCK(); 211 BUFFERS_LOCK();
213 src_fb = evas_filter_buffer_scaled_get(cmd->ctx, cmd->input, sw, sh); 212 src_fb = cmd->ctx->buffer_scaled_get(cmd->ctx, cmd->input, sw, sh);
214 BUFFERS_UNLOCK(); 213 BUFFERS_UNLOCK();
215 214
216 EINA_SAFETY_ON_NULL_GOTO(src_fb, end); 215 EINA_SAFETY_ON_NULL_GOTO(src_fb, end);
@@ -272,18 +271,14 @@ _mapped_blend(void *data, void *drawctx,
272 int right = 0, bottom = 0, left = 0, top = 0; 271 int right = 0, bottom = 0, left = 0, top = 0;
273 int row, col, rows, cols; 272 int row, col, rows, cols;
274 Eina_Bool ret = EINA_TRUE; 273 Eina_Bool ret = EINA_TRUE;
275 Eina_Bool debug = eina_log_domain_level_check(_evas_filter_log_dom, 6);
276 274
277 EINA_SAFETY_ON_FALSE_RETURN_VAL((sx == 0) && (sy == 0), EINA_FALSE); 275 EINA_SAFETY_ON_FALSE_RETURN_VAL((sx == 0) && (sy == 0), EINA_FALSE);
278 276
279 if (fillmode == EVAS_FILTER_FILL_MODE_NONE) 277 if (fillmode == EVAS_FILTER_FILL_MODE_NONE)
280 { 278 {
281 _clip_to_target(&sx, &sy, sw, sh, dx, dy, dw, dh, &dx, &dy, &rows, &cols); 279 _clip_to_target(&sx, &sy, sw, sh, dx, dy, dw, dh, &dx, &dy, &rows, &cols);
282 if (debug) 280 XDBG("blend: %d,%d,%d,%d --> %d,%d,%d,%d (from %dx%d to %dx%d +%d,%d)",
283 { 281 0, 0, sw, sh, dx, dy, cols, rows, sw, sh, dw, dh, dx, dy);
284 XDBG("blend: %d,%d,%d,%d --> %d,%d,%d,%d (from %dx%d to %dx%d +%d,%d)",
285 0, 0, sw, sh, dx, dy, cols, rows, sw, sh, dw, dh, dx, dy);
286 }
287 image_draw(data, drawctx, 282 image_draw(data, drawctx,
288 src_map, src_stride, dst_map, dst_stride, 283 src_map, src_stride, dst_map, dst_stride,
289 sx, sy, cols, rows, // src 284 sx, sy, cols, rows, // src
@@ -418,14 +413,11 @@ _mapped_blend(void *data, void *drawctx,
418 } 413 }
419 if (src_w <= 0 || dst_w <= 0) break; 414 if (src_w <= 0 || dst_w <= 0) break;
420 415
421 if (debug) 416 XDBG("blend: [%d,%d] %d,%d,%dx%d --> %d,%d,%dx%d "
422 { 417 "(src %dx%d, dst %dx%d)",
423 XDBG("blend: [%d,%d] %d,%d,%dx%d --> %d,%d,%dx%d " 418 col, row, src_x, src_y, src_w, src_h,
424 "(src %dx%d, dst %dx%d)", 419 dst_x, dst_y, dst_w, dst_h,
425 col, row, src_x, src_y, src_w, src_h, 420 sw, sh, dw, dh);
426 dst_x, dst_y, dst_w, dst_h,
427 sw, sh, dw, dh);
428 }
429 image_draw(data, drawctx, 421 image_draw(data, drawctx,
430 src_map, src_stride, dst_map, dst_stride, 422 src_map, src_stride, dst_map, dst_stride,
431 src_x, src_y, src_w, src_h, 423 src_x, src_y, src_w, src_h,
@@ -437,7 +429,7 @@ _mapped_blend(void *data, void *drawctx,
437} 429}
438 430
439Evas_Filter_Apply_Func 431Evas_Filter_Apply_Func
440evas_filter_blend_cpu_func_get(Evas_Filter_Command *cmd) 432eng_filter_blend_func_get(Evas_Filter_Command *cmd)
441{ 433{
442 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd, NULL); 434 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd, NULL);
443 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->output, NULL); 435 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->output, NULL);
diff --git a/src/static_libs/draw/draw.h b/src/static_libs/draw/draw.h
index 9f4089aba0..b3393d2aaf 100644
--- a/src/static_libs/draw/draw.h
+++ b/src/static_libs/draw/draw.h
@@ -9,11 +9,12 @@
9#include "efl/interfaces/efl_gfx_types.eot.h" 9#include "efl/interfaces/efl_gfx_types.eot.h"
10 10
11/* FIXME: naming convention */ 11/* FIXME: naming convention */
12/* FIXME: mul_col & const_alpha are redondant */
12typedef void (*RGBA_Comp_Func) (uint32_t *dest, const uint32_t *src, int length, uint32_t mul_col, uint32_t const_alpha); 13typedef void (*RGBA_Comp_Func) (uint32_t *dest, const uint32_t *src, int length, uint32_t mul_col, uint32_t const_alpha);
13typedef void (*RGBA_Comp_Func_Solid) (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha); 14typedef void (*RGBA_Comp_Func_Solid) (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha);
14typedef void (*RGBA_Comp_Func_Mask) (uint32_t *dest, uint8_t *mask, int length, uint32_t color); 15typedef void (*RGBA_Comp_Func_Mask) (uint32_t *dest, const uint8_t *mask, int length, uint32_t color);
15typedef void (*Draw_Func_ARGB_Mix3) (uint32_t *dest, uint32_t *src, uint32_t *mul, int len, uint32_t color); 16typedef void (*Draw_Func_ARGB_Mix3) (uint32_t *dest, const uint32_t *src, const uint32_t *mul, int len, uint32_t color);
16typedef void (*Alpha_Gfx_Func) (uint8_t *src, uint8_t *dst, int len); 17typedef void (*Draw_Func_Alpha) (uint8_t *dest, const uint8_t *src, int len);
17typedef Eina_Bool (*Cspace_Convert_Func) (void *dst, const void *src, int w, int h, int src_stride, int dst_stride, Eina_Bool has_alpha, Efl_Gfx_Colorspace srccs, Efl_Gfx_Colorspace dstcs); 18typedef Eina_Bool (*Cspace_Convert_Func) (void *dst, const void *src, int w, int h, int src_stride, int dst_stride, Eina_Bool has_alpha, Efl_Gfx_Colorspace srccs, Efl_Gfx_Colorspace dstcs);
18 19
19int efl_draw_init(void); 20int efl_draw_init(void);
@@ -22,7 +23,7 @@ RGBA_Comp_Func efl_draw_func_span_get (Efl_Gfx_Render_Op op, uint3
22RGBA_Comp_Func_Solid efl_draw_func_solid_span_get (Efl_Gfx_Render_Op op, uint32_t color); 23RGBA_Comp_Func_Solid efl_draw_func_solid_span_get (Efl_Gfx_Render_Op op, uint32_t color);
23RGBA_Comp_Func_Mask efl_draw_func_mask_span_get (Efl_Gfx_Render_Op op, uint32_t color); 24RGBA_Comp_Func_Mask efl_draw_func_mask_span_get (Efl_Gfx_Render_Op op, uint32_t color);
24Draw_Func_ARGB_Mix3 efl_draw_func_argb_mix3_get (Efl_Gfx_Render_Op op, uint32_t color); 25Draw_Func_ARGB_Mix3 efl_draw_func_argb_mix3_get (Efl_Gfx_Render_Op op, uint32_t color);
25Alpha_Gfx_Func efl_draw_alpha_func_get (Efl_Gfx_Render_Op op, Eina_Bool has_mask); 26Draw_Func_Alpha efl_draw_alpha_func_get (Efl_Gfx_Render_Op op, Eina_Bool has_mask);
26Cspace_Convert_Func efl_draw_convert_func_get (Efl_Gfx_Colorspace origcs, Efl_Gfx_Colorspace dstcs, Eina_Bool *region_can); 27Cspace_Convert_Func efl_draw_convert_func_get (Efl_Gfx_Colorspace origcs, Efl_Gfx_Colorspace dstcs, Eina_Bool *region_can);
27 28
28 29
diff --git a/src/static_libs/draw/draw_alpha_main.c b/src/static_libs/draw/draw_alpha_main.c
index ebd93e8daf..8424d95859 100644
--- a/src/static_libs/draw/draw_alpha_main.c
+++ b/src/static_libs/draw/draw_alpha_main.c
@@ -2,7 +2,7 @@
2 2
3/** default op: d = d*(1-sa) + s */ 3/** default op: d = d*(1-sa) + s */
4static void 4static void
5_alpha_func_blend(uint8_t *src, uint8_t *dst, int len) 5_alpha_func_blend(uint8_t *dst, const uint8_t *src, int len)
6{ 6{
7 int k; 7 int k;
8 8
@@ -19,7 +19,7 @@ _alpha_func_blend(uint8_t *src, uint8_t *dst, int len)
19 19
20/** d = s */ 20/** d = s */
21static void 21static void
22_alpha_func_copy(uint8_t *src, uint8_t *dst, int len) 22_alpha_func_copy(uint8_t *dst, const uint8_t *src, int len)
23{ 23{
24 EINA_SAFETY_ON_NULL_RETURN(src); 24 EINA_SAFETY_ON_NULL_RETURN(src);
25 EINA_SAFETY_ON_NULL_RETURN(dst); 25 EINA_SAFETY_ON_NULL_RETURN(dst);
@@ -29,7 +29,7 @@ _alpha_func_copy(uint8_t *src, uint8_t *dst, int len)
29 29
30/** d = d*s */ 30/** d = d*s */
31static void 31static void
32_alpha_func_mul(uint8_t *src, uint8_t *dst, int len) 32_alpha_func_mul(uint8_t *dst, const uint8_t *src, int len)
33{ 33{
34 int k; 34 int k;
35 35
@@ -44,7 +44,7 @@ _alpha_func_mul(uint8_t *src, uint8_t *dst, int len)
44 } 44 }
45} 45}
46 46
47Alpha_Gfx_Func 47Draw_Func_Alpha
48efl_draw_alpha_func_get(Efl_Gfx_Render_Op op, Eina_Bool has_mask) 48efl_draw_alpha_func_get(Efl_Gfx_Render_Op op, Eina_Bool has_mask)
49{ 49{
50 if (!has_mask) 50 if (!has_mask)
diff --git a/src/static_libs/draw/draw_main.c b/src/static_libs/draw/draw_main.c
index 8577beacce..92d2044541 100644
--- a/src/static_libs/draw/draw_main.c
+++ b/src/static_libs/draw/draw_main.c
@@ -133,7 +133,7 @@ _comp_func_source(uint32_t *dest, const uint32_t *src, int length, uint32_t colo
133 * d = d * (1-sa) + s * sa 133 * d = d * (1-sa) + s * sa
134 */ 134 */
135static void 135static void
136_comp_func_mask_blend(uint32_t *dest, uint8_t *mask, int length, uint32_t color) 136_comp_func_mask_blend(uint32_t *dest, const uint8_t *mask, int length, uint32_t color)
137{ 137{
138 int k; 138 int k;
139 139
@@ -149,7 +149,7 @@ _comp_func_mask_blend(uint32_t *dest, uint8_t *mask, int length, uint32_t color)
149 * d = s * sa 149 * d = s * sa
150 */ 150 */
151static void 151static void
152_comp_func_mask_copy(uint32_t *dest, uint8_t *mask, int length, uint32_t color) 152_comp_func_mask_copy(uint32_t *dest, const uint8_t *mask, int length, uint32_t color)
153{ 153{
154 int k; 154 int k;
155 155
@@ -163,7 +163,7 @@ _comp_func_mask_copy(uint32_t *dest, uint8_t *mask, int length, uint32_t color)
163 * d = d * (1-wa) + w * wa 163 * d = d * (1-wa) + w * wa
164 */ 164 */
165static void 165static void
166_comp_func_mix3_blend(uint32_t *dest, uint32_t *src, uint32_t *mul, int len, uint32_t color) 166_comp_func_mix3_blend(uint32_t *dest, const uint32_t *src, const uint32_t *mul, int len, uint32_t color)
167{ 167{
168 int k, a; 168 int k, a;
169 169
@@ -178,7 +178,7 @@ _comp_func_mix3_blend(uint32_t *dest, uint32_t *src, uint32_t *mul, int len, uin
178 178
179/* d = s * m * c */ 179/* d = s * m * c */
180static void 180static void
181_comp_func_mix3_copy(uint32_t *dest, uint32_t *src, uint32_t *mul, int len, uint32_t color) 181_comp_func_mix3_copy(uint32_t *dest, const uint32_t *src, const uint32_t *mul, int len, uint32_t color)
182{ 182{
183 int k; 183 int k;
184 184
@@ -193,7 +193,7 @@ _comp_func_mix3_copy(uint32_t *dest, uint32_t *src, uint32_t *mul, int len, uint
193 * d = d * (1-wa) + w * wa 193 * d = d * (1-wa) + w * wa
194 */ 194 */
195static void 195static void
196_comp_func_mix3_blend_nomul(uint32_t *dest, uint32_t *src, uint32_t *mul, int len, uint32_t color EINA_UNUSED) 196_comp_func_mix3_blend_nomul(uint32_t *dest, const uint32_t *src, const uint32_t *mul, int len, uint32_t color EINA_UNUSED)
197{ 197{
198 int k, a; 198 int k, a;
199 199
@@ -207,7 +207,7 @@ _comp_func_mix3_blend_nomul(uint32_t *dest, uint32_t *src, uint32_t *mul, int le
207 207
208/* d = s * m */ 208/* d = s * m */
209static void 209static void
210_comp_func_mix3_copy_nomul(uint32_t *dest, uint32_t *src, uint32_t *mul, int len, uint32_t color EINA_UNUSED) 210_comp_func_mix3_copy_nomul(uint32_t *dest, const uint32_t *src, const uint32_t *mul, int len, uint32_t color EINA_UNUSED)
211{ 211{
212 int k; 212 int k;
213 213