_mask_cpu_rgba_rgba_rgba(Evas_Filter_Command *cmd)
{
Evas_Filter_Command fake_cmd;
+ Evas_Filter_Fill_Mode fillmode;
Evas_Filter_Apply_Func blend;
Evas_Filter_Buffer *fb;
Eina_Bool ret;
EINA_SAFETY_ON_NULL_RETURN_VAL(fb, EINA_FALSE);
fb->locked = EINA_TRUE;
+ // Repeat mask if unspecified - NONE is not possible
+ fillmode = cmd->draw.fillmode;
+ if ((fillmode & (EVAS_FILTER_FILL_MODE_REPEAT_X | EVAS_FILTER_FILL_MODE_STRETCH_X)) == 0)
+ {
+ DBG("X fillmode not specified: defaults to repeat");
+ fillmode |= EVAS_FILTER_FILL_MODE_REPEAT_X;
+ }
+ if ((fillmode & (EVAS_FILTER_FILL_MODE_REPEAT_Y | EVAS_FILTER_FILL_MODE_STRETCH_Y)) == 0)
+ {
+ DBG("Y fillmode not specified: defaults to repeat");
+ fillmode |= EVAS_FILTER_FILL_MODE_REPEAT_Y;
+ }
+
// Mask --> Temp
fake_cmd.input = cmd->mask;
fake_cmd.mask = NULL;
fake_cmd.output = fb;
fake_cmd.draw.render_op = EVAS_RENDER_MUL;
+ fake_cmd.draw.fillmode = fillmode;
blend = evas_filter_blend_cpu_func_get(&fake_cmd);
EINA_SAFETY_ON_NULL_RETURN_VAL(blend, EINA_FALSE);
ret = blend(&fake_cmd);
fake_cmd.draw.render_op = EVAS_RENDER_BLEND;
fake_cmd.input = fb;
fake_cmd.output = cmd->output;
+ fake_cmd.draw.fillmode = EVAS_FILTER_FILL_MODE_NONE;
blend = evas_filter_blend_cpu_func_get(&fake_cmd);
EINA_SAFETY_ON_NULL_RETURN_VAL(blend, EINA_FALSE);
ret = blend(&fake_cmd);
Blend two input buffers into a third (target).
@code
- mask (mask, src = input, dst = output, color = white, fillmode = none);
+ mask (mask, src = input, dst = output, color = white, fillmode = repeat);
@endcode
@param mask A mask or texture to blend with the input @a src into the target @a dst.
@param dst Destination buffer for blending. This must be of same size and colorspace as @a src.
@param color A color to use for alpha to RGBA conversion for the blend operations. White means no change.
See @ref evasfilters_color "colors". This will have no effect on RGBA sources.
- @param fillmode Defines whether to stretch or repeat the @a mask if its size that of @src. Should be set when masking with external textures. Default is none. See @ref evasfilter_fillmode "fillmodes".
+ @param fillmode Defines whether to stretch or repeat the @a mask if its size that of @src.
+ Should be set when masking with external textures. Default is repeat. See @ref evasfilter_fillmode "fillmodes".
Note that @a src and @a mask are interchangeable, if they have the same dimensions.
_instruction_param_seq_add(instr, "src", VT_BUFFER, "input");
_instruction_param_seq_add(instr, "dst", VT_BUFFER, "output");
_instruction_param_name_add(instr, "color", VT_COLOR, 0xFFFFFFFF);
- _instruction_param_name_add(instr, "fillmode", VT_STRING, "none");
+ _instruction_param_name_add(instr, "fillmode", VT_STRING, "repeat");
return EINA_TRUE;
}