/hg/gfx-test: Added two helper methods and six tests into the te...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Wed Feb 27 00:47:14 PST 2013


changeset 779aa3c435fa in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=779aa3c435fa
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Wed Feb 27 09:50:21 2013 +0100

	Added two helper methods and six tests into the test suite BitBltRescaleOp.


diffstat:

 ChangeLog                                       |    5 +
 src/org/gfxtest/testsuites/BitBltRescaleOp.java |  120 +++++++++++++++++++++++-
 2 files changed, 124 insertions(+), 1 deletions(-)

diffs (142 lines):

diff -r d4dc0f90ced3 -r 779aa3c435fa ChangeLog
--- a/ChangeLog	Tue Feb 26 11:27:37 2013 +0100
+++ b/ChangeLog	Wed Feb 27 09:50:21 2013 +0100
@@ -1,3 +1,8 @@
+2013-02-27  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/BitBltRescaleOp.java:
+	Added two helper methods and six tests into the test suite BitBltRescaleOp.
+
 2013-02-26  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/framework/CommonBitmapOperations.java:
diff -r d4dc0f90ced3 -r 779aa3c435fa src/org/gfxtest/testsuites/BitBltRescaleOp.java
--- a/src/org/gfxtest/testsuites/BitBltRescaleOp.java	Tue Feb 26 11:27:37 2013 +0100
+++ b/src/org/gfxtest/testsuites/BitBltRescaleOp.java	Wed Feb 27 09:50:21 2013 +0100
@@ -83,7 +83,125 @@
     private static final RescaleOp darkenROP = new RescaleOp(NoFilterScale, DarkeningOffset, null);
     private static final RescaleOp lightenROP = new RescaleOp(NoFilterScale, LighteningOffset, 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 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 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 testBitBltEmptyBufferedImageType3ByteBGRbackgroundNoROP(TestImage image, Graphics2D graphics2d)
+    {
+        return doBitBltEmptyBufferedImageType3ByteRGB(image, graphics2d, noOpROP);
+    }
+
+    /**
+     * 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 testBitBltEmptyBufferedImageType3ByteBGRbackgroundDarkenROP(TestImage image, Graphics2D graphics2d)
+    {
+        return doBitBltEmptyBufferedImageType3ByteRGB(image, graphics2d, darkenROP);
+    }
+
+    /**
+     * 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 testBitBltEmptyBufferedImageType3ByteBGRbackgroundLightenROP(TestImage image, Graphics2D graphics2d)
+    {
+        return doBitBltEmptyBufferedImageType3ByteRGB(image, graphics2d, lightenROP);
+    }
+
+    /**
+     * 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 testBitBltCheckerBufferedImageType3ByteBGRbackgroundNoROP(TestImage image, Graphics2D graphics2d)
+    {
+        return doBitBltCheckerBufferedImageType3ByteRGB(image, graphics2d, noOpROP);
+    }
+
+    /**
+     * 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 testBitBltCheckerBufferedImageType3ByteBGRbackgroundDarkenROP(TestImage image, Graphics2D graphics2d)
+    {
+        return doBitBltCheckerBufferedImageType3ByteRGB(image, graphics2d, darkenROP);
+    }
+
+    /**
+     * 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 testBitBltCheckerBufferedImageType3ByteBGRbackgroundLightenROP(TestImage image, Graphics2D graphics2d)
+    {
+        return doBitBltCheckerBufferedImageType3ByteRGB(image, graphics2d, lightenROP);
+    }
+
     /**
      * Entry point to the test suite.
      *



More information about the distro-pkg-dev mailing list