8024261: xrender: improve performance of small fillRect operations

Reviewed-by: prr, bae
This commit is contained in:
Clemens Eisserer 2013-09-05 11:50:42 +04:00
parent 5159f55769
commit d8b770b0cd

View File

@ -285,7 +285,12 @@ public class XRCompositeManager {
if (xorEnabled) {
con.GCRectangles(dst.getXid(), dst.getGC(), rects);
} else {
con.renderRectangles(dst.getPicture(), compRule, solidColor, rects);
if (rects.getSize() == 1) {
con.renderRectangle(dst.getPicture(), compRule, solidColor,
rects.getX(0), rects.getY(0), rects.getWidth(0), rects.getHeight(0));
} else {
con.renderRectangles(dst.getPicture(), compRule, solidColor, rects);
}
}
}