6975884: sun/java2d/SunGraphics2D/DrawImageBilinear.java failed
authorbae
Thu, 07 Oct 2010 12:25:23 +0400
changeset 6813 42f6c9c441b5
parent 6812 83cac1fcd3ed
child 6814 c6e347fb5b20
6975884: sun/java2d/SunGraphics2D/DrawImageBilinear.java failed Reviewed-by: prr
jdk/test/sun/java2d/SunGraphics2D/DrawImageBilinear.java
--- a/jdk/test/sun/java2d/SunGraphics2D/DrawImageBilinear.java	Wed Oct 06 12:19:54 2010 +0400
+++ b/jdk/test/sun/java2d/SunGraphics2D/DrawImageBilinear.java	Thu Oct 07 12:25:23 2010 +0400
@@ -104,7 +104,9 @@
 
             // second time will be a texture->surface blit
             g2d.drawImage(bimg2, 80, 10, 40, 40, null);
-            g2d.drawImage(bimg2, 80, 10, 40, 40, null);
+            if (!skipOglTextureTest) {
+                g2d.drawImage(bimg2, 80, 10, 40, 40, null);
+            }
 
             // third time will be a pbuffer->surface blit
             if (vimg.validate(getGraphicsConfiguration()) != VolatileImage.IMAGE_OK) {
@@ -150,6 +152,8 @@
         }
     }
 
+    private static boolean skipOglTextureTest = false;
+
     public static void main(String[] args) {
         boolean show = false;
         for (String arg : args) {
@@ -158,6 +162,11 @@
             }
         }
 
+        String arch = System.getProperty("os.arch");
+        boolean isOglEnabled = Boolean.getBoolean("sun.java2d.opengl");
+        skipOglTextureTest = isOglEnabled && ("sparc".equals(arch));
+        System.out.println("Skip OpenGL texture test: " + skipOglTextureTest);
+
         DrawImageBilinear test = new DrawImageBilinear();
         Frame frame = new Frame();
         frame.add(test);