Lines Matching refs:blend
85 * so the correct approach is to blend using DST_COLOR instead of
103 blend_for_op(struct xa_composite_blend *blend,
117 *blend = xa_blends[XA_BLEND_OP_OVER];
121 *blend = xa_blends[i];
130 if (mask_pic && mask_pic->component_alpha && blend->alpha_src)
138 blend->rgb_src = xa_convert_blend_for_luminance(blend->rgb_src);
139 blend->rgb_dst = xa_convert_blend_for_luminance(blend->rgb_dst);
143 * If there's no dst alpha channel, adjust the blend op so that we'll treat
147 if (xa_format_a(dst_pic->pict_format) == 0 && blend->alpha_dst) {
148 if (blend->rgb_src == PIPE_BLENDFACTOR_DST_ALPHA)
149 blend->rgb_src = PIPE_BLENDFACTOR_ONE;
150 else if (blend->rgb_src == PIPE_BLENDFACTOR_INV_DST_ALPHA)
151 blend->rgb_src = PIPE_BLENDFACTOR_ZERO;
229 struct xa_composite_blend blend;
240 if (!blend_for_op(&blend, comp->op, comp->src, comp->mask, comp->dst))
246 if (mask_pic && mask_pic->component_alpha && blend.alpha_src)
257 struct pipe_blend_state blend;
262 memset(&blend, 0, sizeof(struct pipe_blend_state));
263 blend.rt[0].blend_enable = 1;
264 blend.rt[0].colormask = PIPE_MASK_RGBA;
266 blend.rt[0].rgb_src_factor = blend_opt.rgb_src;
267 blend.rt[0].alpha_src_factor = blend_opt.rgb_src;
268 blend.rt[0].rgb_dst_factor = blend_opt.rgb_dst;
269 blend.rt[0].alpha_dst_factor = blend_opt.rgb_dst;
271 cso_set_blend(ctx->cso, &blend);