[cairo-bugs] [Bug 88203] Replaying recording surfaces with OVER has far worse performance than when using the SOURCE operator

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jan 8 12:50:37 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=88203

--- Comment #3 from Chris Wilson <chris at chris-wilson.co.uk> ---
Right, an OVER operator with no mask need no incur the replay onto an
intermediate surface.

I think it would be simpler as

diff --git a/src/cairo-spans-compositor.c b/src/cairo-spans-compositor.c
index efbae25..34b11ae 100644
--- a/src/cairo-spans-compositor.c
+++ b/src/cairo-spans-compositor.c
@@ -579,7 +579,7 @@ composite_aligned_boxes (const cairo_spans_compositor_t     
     }

     /* Are we just copying a recording surface? */
-    if (inplace &&
+    if ((inplace || (op == CAIRO_OPERATOR_OVER && no_mask)) &&
        recording_pattern_contains_sample (&extents->source_pattern.base,
                                           &extents->source_sample_area))
     {
@@ -591,7 +591,7 @@ composite_aligned_boxes (const cairo_spans_compositor_t     
        /* XXX could also do tiling repeat modes... */

        /* first clear the area about to be overwritten */
-       if (! dst->is_clear) {
+       if (! dst->is_clear && op_is_source) {
            status = compositor->fill_boxes (dst,
                                             CAIRO_OPERATOR_CLEAR,
                                             CAIRO_COLOR_TRANSPARENT,

or even replace that op_is_source with inplace for consistency. Can you please
check that the recording_surface_over test hits the new path and check that it
missed the optimisation before.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20150108/023625d6/attachment.html>


More information about the cairo-bugs mailing list