提交 9c2a11a5 编写于 作者: A azvegint

8130400: Test...

8130400: Test java/awt/image/DrawImage/IncorrectClipXorModeSurface2Surface.java fails with ClassCastException
Reviewed-by: prr, serb
上级 a73c6a39
......@@ -46,13 +46,16 @@ public class XRDrawImage extends DrawImage {
SurfaceData dstData = sg.surfaceData;
SurfaceData srcData = dstData.getSourceSurfaceData(img,
SunGraphics2D.TRANSFORM_GENERIC, sg.imageComp, bgColor);
if (sg.composite instanceof AlphaComposite) {
int compRule = ((AlphaComposite) sg.composite).getRule();
float extraAlpha = ((AlphaComposite) sg.composite).getAlpha();
if (srcData != null && !isBgOperation(srcData, bgColor)
&& interpType <= AffineTransformOp.TYPE_BILINEAR
&& (XRUtils.isMaskEvaluated(XRUtils.j2dAlphaCompToXR(compRule))
|| (XRUtils.isTransformQuadrantRotated(tx)) && extraAlpha == 1.0f))
|| (XRUtils.isTransformQuadrantRotated(tx))
&& extraAlpha == 1.0f))
{
SurfaceType srcType = srcData.getSurfaceType();
SurfaceType dstType = dstData.getSurfaceType();
......@@ -66,6 +69,7 @@ public class XRDrawImage extends DrawImage {
return;
}
}
}
super.renderImageXform(sg, img, tx, interpType, sx1, sy1, sx2, sy2,
bgColor);
......
......@@ -40,7 +40,7 @@ import static java.awt.geom.Rectangle2D.Double;
/**
* @test
* @bug 8061831
* @bug 8061831 8130400
* @summary Tests drawing volatile image to volatile image using different
* clips + xor mode. Results of the blit compatibleImage to
* compatibleImage is used for comparison.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册