提交 0d32c208 编写于 作者: C ceisserer

8024261: xrender: improve performance of small fillRect operations

Reviewed-by: prr, bae
上级 866f7bd5
...@@ -284,10 +284,15 @@ public class XRCompositeManager { ...@@ -284,10 +284,15 @@ public class XRCompositeManager {
public void XRRenderRectangles(XRSurfaceData dst, GrowableRectArray rects) { public void XRRenderRectangles(XRSurfaceData dst, GrowableRectArray rects) {
if (xorEnabled) { if (xorEnabled) {
con.GCRectangles(dst.getXid(), dst.getGC(), rects); con.GCRectangles(dst.getXid(), dst.getGC(), rects);
} else {
if (rects.getSize() == 1) {
con.renderRectangle(dst.getPicture(), compRule, solidColor,
rects.getX(0), rects.getY(0), rects.getWidth(0), rects.getHeight(0));
} else { } else {
con.renderRectangles(dst.getPicture(), compRule, solidColor, rects); con.renderRectangles(dst.getPicture(), compRule, solidColor, rects);
} }
} }
}
public void compositeBlit(XRSurfaceData src, XRSurfaceData dst, int sx, public void compositeBlit(XRSurfaceData src, XRSurfaceData dst, int sx,
int sy, int dx, int dy, int w, int h) { int sy, int dx, int dy, int w, int h) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册