/hg/gfx-test: That class now extend BitBltAffineTransformOp, not...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Mon Jul 29 03:04:41 PDT 2013


changeset 646968f6fced in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=646968f6fced
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Mon Jul 29 12:08:18 2013 +0200

	That class now extend BitBltAffineTransformOp, not GfxTest directly.
	Refactoring, added new tests to this test suite.


diffstat:

 ChangeLog                                       |    6 +
 src/org/gfxtest/testsuites/BitBltRescaleOp.java |  232 ++++++++++++-----------
 2 files changed, 123 insertions(+), 115 deletions(-)

diffs (301 lines):

diff -r 458d896ac158 -r 646968f6fced ChangeLog
--- a/ChangeLog	Fri Jul 26 11:31:51 2013 +0200
+++ b/ChangeLog	Mon Jul 29 12:08:18 2013 +0200
@@ -1,3 +1,9 @@
+2013-07-29  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/BitBltRescaleOp.java:
+	That class now extend BitBltAffineTransformOp, not GfxTest directly.
+	Refactoring, added new tests to this test suite.
+
 2013-07-26  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/BitBltUsingBgColorAlpha.java:
diff -r 458d896ac158 -r 646968f6fced src/org/gfxtest/testsuites/BitBltRescaleOp.java
--- a/src/org/gfxtest/testsuites/BitBltRescaleOp.java	Fri Jul 26 11:31:51 2013 +0200
+++ b/src/org/gfxtest/testsuites/BitBltRescaleOp.java	Mon Jul 29 12:08:18 2013 +0200
@@ -41,12 +41,8 @@
 package org.gfxtest.testsuites;
 
 import java.awt.Graphics2D;
-import java.awt.image.BufferedImage;
-import java.awt.image.BufferedImageOp;
 import java.awt.image.RescaleOp;
 
-import org.gfxtest.framework.CommonBitmapOperations;
-import org.gfxtest.framework.GfxTest;
 import org.gfxtest.framework.TestImage;
 import org.gfxtest.framework.TestResult;
 import org.gfxtest.framework.annotations.BitBltOperation;
@@ -69,7 +65,7 @@
 @BitBltOperation(BitBltOperations.BITBLT)
 @Transformation(Transformations.NONE)
 @Zoom(1)
-public class BitBltRescaleOp extends GfxTest
+public class BitBltRescaleOp extends BitBltAffineTransformOp
 {
     private static final float NoFilterScale = 1.0f;
     private static final float BlackImageScale = 0.0f;
@@ -113,112 +109,6 @@
     private static final RescaleOp blackImageScaleROP = new RescaleOp(BlackImageScale, ZeroOffset, null);
 
     /**
-     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR
-     *
-     * @param image
-     *            image used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @param rasterOp
-     *            selected raster operation
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    private TestResult doBitBltEmptyBufferedImageType3ByteRGB(TestImage image, Graphics2D graphics2d,
-                    BufferedImageOp rasterOp)
-    {
-        return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, rasterOp);
-    }
-
-    /**
-     * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR
-     *
-     * @param image
-     *            image used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @param rasterOp
-     *            selected raster operation
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    private TestResult doBitBltEmptyBufferedImageType4ByteABGR(TestImage image, Graphics2D graphics2d,
-                    BufferedImageOp rasterOp)
-    {
-        return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR, rasterOp);
-    }
-
-    /**
-     * Test basic BitBlt operation for buffered image containing checker pattern
-     * with type TYPE_3BYTE_BGR
-     * 
-     * @param image
-     *            image used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @param rasterOp
-     *            selected raster operation
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    private TestResult doBitBltCheckerBufferedImageType3ByteRGB(TestImage image, Graphics2D graphics2d,
-                    BufferedImageOp rasterOp)
-    {
-        return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, rasterOp);
-    }
-
-    /**
-     * Test basic BitBlt operation for buffered image containing diagonal checker pattern
-     * with type TYPE_3BYTE_BGR
-     * 
-     * @param image
-     *            image used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @param rasterOp
-     *            selected raster operation
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    private TestResult doBitBltDiagonalCheckerBufferedImageType3ByteRGB(TestImage image, Graphics2D graphics2d,
-                    BufferedImageOp rasterOp)
-    {
-        return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, rasterOp);
-    }
-
-    /**
-     * Test basic BitBlt operation for buffered image containing grid pattern
-     * with type TYPE_3BYTE_BGR
-     * 
-     * @param image
-     *            image used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @param rasterOp
-     *            selected raster operation
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    private TestResult doBitBltGridBufferedImageType3ByteRGB(TestImage image, Graphics2D graphics2d,
-                    BufferedImageOp rasterOp)
-    {
-        return CommonBitmapOperations.doBitBltTestWithGridImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, rasterOp);
-    }
-
-    /**
-     * Test basic BitBlt operation for buffered image containing diagonal grid pattern
-     * with type TYPE_3BYTE_BGR
-     * 
-     * @param image
-     *            image used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @param rasterOp
-     *            selected raster operation
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    private TestResult doBitBltDiagonalGridBufferedImageType3ByteRGB(TestImage image, Graphics2D graphics2d,
-                    BufferedImageOp rasterOp)
-    {
-        return CommonBitmapOperations.doBitBltTestWithDiagonalGridImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, rasterOp);
-    }
-
-    /**
      * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
      *
      * @param image
@@ -297,6 +187,34 @@
      *            graphics canvas
      * @return test result status - PASSED, FAILED or ERROR
      */
+    public TestResult testBitBltEmptyBufferedImageType3ByteBGRbackgroundDarkenScaleROP(TestImage image, Graphics2D graphics2d)
+    {
+        return doBitBltEmptyBufferedImageType3ByteRGB(image, graphics2d, darkenScaleROP);
+    }
+
+    /**
+     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
+     *
+     * @param image
+     *            image used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testBitBltEmptyBufferedImageType3ByteBGRbackgroundLightenOffsetROP(TestImage image, Graphics2D graphics2d)
+    {
+        return doBitBltEmptyBufferedImageType3ByteRGB(image, graphics2d, lightenOffsetROP);
+    }
+
+    /**
+     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
+     *
+     * @param image
+     *            image used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
     public TestResult testBitBltEmptyBufferedImageType3ByteBGRbackgroundLightenRedOffsetROP(TestImage image, Graphics2D graphics2d)
     {
         return doBitBltEmptyBufferedImageType3ByteRGB(image, graphics2d, lightenRedOffsetROP);
@@ -339,9 +257,9 @@
      *            graphics canvas
      * @return test result status - PASSED, FAILED or ERROR
      */
-    public TestResult testBitBltEmptyBufferedImageType3ByteBGRbackgroundLightenOffsetROP(TestImage image, Graphics2D graphics2d)
+    public TestResult testBitBltEmptyBufferedImageType3ByteBGRbackgroundLightenScaleROP(TestImage image, Graphics2D graphics2d)
     {
-        return doBitBltEmptyBufferedImageType3ByteRGB(image, graphics2d, lightenOffsetROP);
+        return doBitBltEmptyBufferedImageType3ByteRGB(image, graphics2d, lightenScaleROP);
     }
 
     /**
@@ -423,6 +341,62 @@
      *            graphics canvas
      * @return test result status - PASSED, FAILED or ERROR
      */
+    public TestResult testBitBltCheckerBufferedImageType3ByteBGRbackgroundDarkenRedOffsetROP(TestImage image, Graphics2D graphics2d)
+    {
+        return doBitBltCheckerBufferedImageType3ByteRGB(image, graphics2d, darkenRedOffsetROP);
+    }
+
+    /**
+     * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR.
+     *
+     * @param image
+     *            image used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testBitBltCheckerBufferedImageType3ByteBGRbackgroundDarkenGreenOffsetROP(TestImage image, Graphics2D graphics2d)
+    {
+        return doBitBltCheckerBufferedImageType3ByteRGB(image, graphics2d, darkenGreenOffsetROP);
+    }
+
+    /**
+     * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR.
+     *
+     * @param image
+     *            image used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testBitBltCheckerBufferedImageType3ByteBGRbackgroundDarkenBlueOffsetROP(TestImage image, Graphics2D graphics2d)
+    {
+        return doBitBltCheckerBufferedImageType3ByteRGB(image, graphics2d, darkenBlueOffsetROP);
+    }
+
+    /**
+     * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR.
+     *
+     * @param image
+     *            image used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testBitBltCheckerBufferedImageType3ByteBGRbackgroundDarkenScaleROP(TestImage image, Graphics2D graphics2d)
+    {
+        return doBitBltCheckerBufferedImageType3ByteRGB(image, graphics2d, darkenScaleROP);
+    }
+
+    /**
+     * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR.
+     *
+     * @param image
+     *            image used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
     public TestResult testBitBltCheckerBufferedImageType3ByteBGRbackgroundLightenOffsetROP(TestImage image, Graphics2D graphics2d)
     {
         return doBitBltCheckerBufferedImageType3ByteRGB(image, graphics2d, lightenOffsetROP);
@@ -437,9 +411,37 @@
      *            graphics canvas
      * @return test result status - PASSED, FAILED or ERROR
      */
-    public TestResult testBitBltCheckerBufferedImageType3ByteBGRbackgroundDarkenScaleROP(TestImage image, Graphics2D graphics2d)
+    public TestResult testBitBltCheckerBufferedImageType3ByteBGRbackgroundLightenRedOffsetROP(TestImage image, Graphics2D graphics2d)
     {
-        return doBitBltCheckerBufferedImageType3ByteRGB(image, graphics2d, darkenScaleROP);
+        return doBitBltCheckerBufferedImageType3ByteRGB(image, graphics2d, lightenRedOffsetROP);
+    }
+
+    /**
+     * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR.
+     *
+     * @param image
+     *            image used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testBitBltCheckerBufferedImageType3ByteBGRbackgroundLightenGreenOffsetROP(TestImage image, Graphics2D graphics2d)
+    {
+        return doBitBltCheckerBufferedImageType3ByteRGB(image, graphics2d, lightenGreenOffsetROP);
+    }
+
+    /**
+     * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR.
+     *
+     * @param image
+     *            image used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testBitBltCheckerBufferedImageType3ByteBGRbackgroundLightenBlueOffsetROP(TestImage image, Graphics2D graphics2d)
+    {
+        return doBitBltCheckerBufferedImageType3ByteRGB(image, graphics2d, lightenBlueOffsetROP);
     }
 
     /**



More information about the distro-pkg-dev mailing list