<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Replaying recording surfaces with OVER has far worse performance than when using the SOURCE operator"
href="https://bugs.freedesktop.org/show_bug.cgi?id=88203#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Replaying recording surfaces with OVER has far worse performance than when using the SOURCE operator"
href="https://bugs.freedesktop.org/show_bug.cgi?id=88203">bug 88203</a>
from <span class="vcard"><a class="email" href="mailto:chris@chris-wilson.co.uk" title="Chris Wilson <chris@chris-wilson.co.uk>"> <span class="fn">Chris Wilson</span></a>
</span></b>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>