8255724: [XRender] the BlitRotateClippedArea test fails on Linux in the XR pipeline

Reviewed-by: psadhukhan
This commit is contained in:
Jayathirth D V 2021-10-19 12:25:32 +00:00
parent d17d81a8b2
commit dcd6e0da24
2 changed files with 11 additions and 7 deletions
test/jdk

@ -242,7 +242,6 @@ java/awt/font/TextLayout/TextLayoutBounds.java 8169188 generic-all
java/awt/FontMetrics/FontCrash.java 8198336 windows-all
java/awt/image/BufferedImage/ICMColorDataTest/ICMColorDataTest.java 8233028 generic-all
java/awt/image/DrawImage/IncorrectAlphaSurface2SW.java 8056077 linux-all
java/awt/image/DrawImage/BlitRotateClippedArea.java 8255724 linux-all
java/awt/image/multiresolution/MultiresolutionIconTest.java 8169187,8252812 macosx-all,windows-all,linux-x64
java/awt/print/Headless/HeadlessPrinterJob.java 8196088 windows-all
sun/awt/datatransfer/SuplementaryCharactersTransferTest.java 8011371 generic-all

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -36,7 +36,7 @@ import static java.awt.Transparency.TRANSLUCENT;
/**
* @test
* @bug 8255722
* @bug 8255722 8255724
* @key headful
*/
public class BlitRotateClippedArea {
@ -103,10 +103,15 @@ public class BlitRotateClippedArea {
throws IOException {
for (int x = 0; x < gold.getWidth(); ++x) {
for (int y = 0; y < gold.getHeight(); ++y) {
if (gold.getRGB(x, y) != img.getRGB(x, y)) {
ImageIO.write(gold, "png", new File("gold.png"));
ImageIO.write(img, "png", new File("snapshot.png"));
throw new RuntimeException("Test failed.");
Color goldColor = new Color(gold.getRGB(x, y));
Color actualColor = new Color(img.getRGB(x, y));
if ((Math.abs(goldColor.getRed() - actualColor.getRed()) > 1) ||
(Math.abs(goldColor.getGreen() - actualColor.getGreen()) > 1) ||
(Math.abs(goldColor.getBlue() - actualColor.getBlue()) > 1)) {
ImageIO.write(gold, "png", new File("gold.png"));
ImageIO.write(img, "png", new File("snapshot.png"));
throw new RuntimeException("Test failed for pixel :"
+ x + "/" + y);
}
}
}