changeset 25204:65c62411e10f

8042098: Test sun/java2d/AcceleratedXORModeTest.java fails on Windows Reviewed-by: jgodinez
author prr
date Fri, 20 Jun 2014 12:37:08 -0700
parents ea684628f900
children e07f924ea72d
files jdk/test/sun/java2d/AcceleratedXORModeTest.java
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/sun/java2d/AcceleratedXORModeTest.java	Fri Jun 20 16:48:30 2014 +0400
+++ b/jdk/test/sun/java2d/AcceleratedXORModeTest.java	Fri Jun 20 12:37:08 2014 -0700
@@ -23,7 +23,7 @@
 
 /*
 * @test
-* @bug     8024343
+* @bug     8024343 8042098
 * @summary Test verifies that accelerated pipelines
 *          correctly draws primitives in XOR mode.
 * @run main/othervm -Dsun.java2d.xrender=True AcceleratedXORModeTest
@@ -128,6 +128,7 @@
 
     void test() {
         createVImg();
+        BufferedImage bi = null;
         do {
             int valCode = vImg.validate(getDefaultGC());
             if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) {
@@ -135,9 +136,11 @@
             }
             Graphics2D g = vImg.createGraphics();
             draw(g);
-            BufferedImage bi = vImg.getSnapshot();
+            bi = vImg.getSnapshot();
+        } while (vImg.contentsLost());
+        if (bi != null) {
             test(bi);
             write(bi);
-        } while (vImg.contentsLost());
+        }
     }
 }