提交 67fb7931 编写于 作者: C ceisserer

7150134: JCK api/java_awt/Graphics/index.html#DrawLine fails with OOM for jdk8...

7150134: JCK api/java_awt/Graphics/index.html#DrawLine fails with OOM for jdk8 with XRender pipeline
Reviewed-by: prr
上级 1047331d
...@@ -69,20 +69,26 @@ public class XRRenderer implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe { ...@@ -69,20 +69,26 @@ public class XRRenderer implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe {
} }
public void drawLine(SunGraphics2D sg2d, int x1, int y1, int x2, int y2) { public void drawLine(SunGraphics2D sg2d, int x1, int y1, int x2, int y2) {
try { Region compClip = sg2d.getCompClip();
SunToolkit.awtLock(); int transX1 = x1 + sg2d.transX;
int transY1 = y1 + sg2d.transY;
validateSurface(sg2d); int transX2 = x2 + sg2d.transX;
int transx = sg2d.transX; int transY2 = y2 + sg2d.transY;
int transy = sg2d.transY;
// Non clipped fast path
XRSurfaceData xrsd = (XRSurfaceData) sg2d.surfaceData; if (compClip.contains(transX1, transY1)
&& compClip.contains(transX2, transY2)) {
try {
SunToolkit.awtLock();
tileManager.addLine(x1 + transx, y1 + transy, validateSurface(sg2d);
x2 + transx, y2 + transy); tileManager.addLine(transX1, transY1, transX2, transY2);
tileManager.fillMask(xrsd); tileManager.fillMask((XRSurfaceData) sg2d.surfaceData);
} finally { } finally {
SunToolkit.awtUnlock(); SunToolkit.awtUnlock();
}
} else {
draw(sg2d, new Line2D.Float(x1, y1, x2, y2));
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册