This is an automated email from the git hooks/post-receive script.

git pushed a commit to reference refs/pull/114/head
in repository efl.

View the commit online.

commit 3132a4981678202a0894248059fad1c7e4b86daa
Author: [email protected] <[email protected]>
AuthorDate: Mon Aug 10 17:53:26 2026 -0600

    fix(evas_vg): draw the source for MASK_INTERSECT and MASK_SUBSTRACT
    
    Since c7cb51335d ("feat(ector_gl): composite mask support and VG canvas
    integration") the software backend renders absolutely nothing for these two
    composite methods: expedite's VG Composite All Modes produces a completely
    blank canvas, zero non-white pixels, where the GL span backend draws the
    expected result.
    
    That commit widened the _prepare_comp() guard from MATTE_ALPHA and
    MATTE_ALPHA_INVERSE to also cover MASK_INTERSECT and MASK_SUBSTRACT, which
    the GL path needs so that a mask FBO gets built for them.  The side effect is
    that comp_method is now also handed down to this container's own children -
    the source shapes - for those two methods.  The software rasterizer maps them
    onto _comp_mask_ins() and _comp_mask_sub() in _adjust_span_fill_methods(),
    and those two only ever mutate the mask buffer; unlike the matte cases they
    never write to the raster buffer.  So the source shapes silently went into
    the mask instead of onto the screen.
    
    Translate the method once the mask has been built, right where comp_method
    stops describing how to combine a mask and starts describing how to apply
    one.  Applying an intersect mask is MATTE_ALPHA and applying a subtract mask
    is MATTE_ALPHA_INVERSE, which is exactly what the GL span shader already does
    for these methods.  _prepare_comp() keeps receiving the original method,
    since the mask-building pass does need the combining behaviour.
    
    Software output now matches the equivalent matte method exactly, and matches
    GL to the same degree the matte methods do:
    
      MASK_SUBSTRACT  blank    -> 73559 px, identical to MATTE_ALPHA_INVERSE
      MASK_INTERSECT  blank    -> 58383 px, identical to MATTE_ALPHA
    
    VG Composite All Modes now passes engine parity.  Verify with:
    
      expedite-parity -e opengl_x11 -c 20 124
    
    Note this does not implement mask combining for MASK_ADD and
    MASK_DIFFERENCE, which draw their source unmasked here just as they do on
    master; only the regression to a blank canvas is addressed.
---
 src/lib/evas/canvas/efl_canvas_vg_container.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/lib/evas/canvas/efl_canvas_vg_container.c b/src/lib/evas/canvas/efl_canvas_vg_container.c
index 2a2de947a7..db55edc671 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_container.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_container.c
@@ -305,6 +305,23 @@ _efl_canvas_vg_container_render_pre(Evas_Object_Protected_Data *vg_pd,
                              engine, output, context, surface,
                              ptransform, ctransform, p_opacity, c_a, comp, comp_method);
 
+        /* From here on comp_method is handed to this container's own children,
+         * i.e. to the *source* shapes, for which the mask is already built and
+         * only has to be applied.  MASK_INTERSECT and MASK_SUBSTRACT describe
+         * how a mask is combined while it is being built, and the software
+         * rasterizer maps them onto _comp_mask_ins()/_comp_mask_sub(), which
+         * only ever mutate the mask buffer and never write the raster buffer.
+         * Letting the source shapes reach those would draw nothing at all.
+         * Applying an intersect mask is exactly MATTE_ALPHA, and applying a
+         * subtract mask is exactly MATTE_ALPHA_INVERSE, which is also what the
+         * GL span shader does for these two methods.  Note that _prepare_comp()
+         * above still gets the original method, since the mask-building pass
+         * does need the combining behaviour. */
+        if (comp_method == EFL_GFX_VG_COMPOSITE_METHOD_MASK_INTERSECT)
+          comp_method = EFL_GFX_VG_COMPOSITE_METHOD_MATTE_ALPHA;
+        else if (comp_method == EFL_GFX_VG_COMPOSITE_METHOD_MASK_SUBSTRACT)
+          comp_method = EFL_GFX_VG_COMPOSITE_METHOD_MATTE_ALPHA_INVERSE;
+
         /* GL span-buffer path: _prepare_comp returns NULL but stores the
          * mask FBO on pd->comp.gl_surface.  Propagate it to the shared ector
          * surface so eng_ector_end() can find it when building pipe params. */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to