From: Michel Dänzer <[email protected]> Increases x11perf -compwinwin500 numbers by a factor of 10 for me with radeonsi.
Conditions copied from exaComposite(). Signed-off-by: Michel Dänzer <[email protected]> --- glamor/glamor_render.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index 65f7059..33091c1 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_render.c @@ -1394,6 +1394,29 @@ glamor_composite_clipped_region(CARD8 op, DEBUGF("clipped (%d %d) (%d %d) (%d %d) width %d height %d \n", x_source, y_source, x_mask, y_mask, x_dest, y_dest, width, height); + /* Is the composite operation equivalent to a copy? */ + if (!mask && !source->alphaMap && !dest->alphaMap + && source->pDrawable && !source->transform + && ((op == PictOpSrc + && ((source->format == dest->format + || (PICT_FORMAT_COLOR(dest->format) + && PICT_FORMAT_COLOR(source->format) + && dest->format == PICT_FORMAT(PICT_FORMAT_BPP(source->format), + PICT_FORMAT_TYPE(source->format), + 0, + PICT_FORMAT_R(source->format), + PICT_FORMAT_G(source->format), + PICT_FORMAT_B(source->format)))) + || (op == PictOpOver + && source->format == dest->format + && !PICT_FORMAT_A(source->format)))))) { + glamor_copy(source->pDrawable, dest->pDrawable, NULL, + box, nbox, x_source - x_dest, + y_source - y_dest, FALSE, FALSE, 0, NULL); + ok = TRUE; + goto out; + } + /* XXX is it possible source mask have non-zero drawable.x/y? */ if (source && ((!source->pDrawable -- 2.8.1 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
