changeset 7986:0a317fc785fb

8024261: xrender: improve performance of small fillRect operations Reviewed-by: prr, bae
author ceisserer
date Thu, 05 Sep 2013 11:50:42 +0400
parents c561115d697d
children 2d223e1a9706
files src/solaris/classes/sun/java2d/xr/XRCompositeManager.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/java2d/xr/XRCompositeManager.java	Wed Sep 04 12:38:00 2013 +0400
+++ b/src/solaris/classes/sun/java2d/xr/XRCompositeManager.java	Thu Sep 05 11:50:42 2013 +0400
@@ -285,7 +285,12 @@
         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);
+            }
         }
     }