changeset 663:cfbab4f6666b draft

Updated.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Mon, 15 Dec 2014 10:29:40 +0100
parents d528721f46c7
children 80a03bc8a019
files ChangeLog src/org/gfxtest/testsuites/BitBltUsingBgColor.java
diffstat 2 files changed, 223 insertions(+), 192 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Dec 12 11:51:47 2014 +0100
+++ b/ChangeLog	Mon Dec 15 10:29:40 2014 +0100
@@ -1,3 +1,8 @@
+2014-12-15  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/org/gfxtest/testsuites/BitBltUsingBgColor.java:
+	Updated.
+
 2014-12-12  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* src/org/gfxtest/testsuites/BitBltBufferedImageOp.java:
--- a/src/org/gfxtest/testsuites/BitBltUsingBgColor.java	Fri Dec 12 11:51:47 2014 +0100
+++ b/src/org/gfxtest/testsuites/BitBltUsingBgColor.java	Mon Dec 15 10:29:40 2014 +0100
@@ -1357,198 +1357,224 @@
     }
 
     /**
-     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
-     * Background color is set to Color.cyan.
-     *
-     * @param image
-     *            image to be used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    public TestResult testBitBltEmptyBufferedImageType3ByteBGRbackgroundCyan(TestImage image, Graphics2D graphics2d)
-    {
-        return doBitBltEmptyBufferedImageType3ByteRGB(image, graphics2d, Color.cyan);
-    }
-
-    /**
-     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
-     * Background color is set to Color.red.
-     *
-     * @param image
-     *            image to be used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    public TestResult testBitBltEmptyBufferedImageType3ByteBGRbackgroundRed(TestImage image, Graphics2D graphics2d)
-    {
-        return doBitBltEmptyBufferedImageType3ByteRGB(image, graphics2d, Color.red);
-    }
-
-    /**
-     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
-     * Background color is set to Color.magenta.
-     *
-     * @param image
-     *            image to be used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    public TestResult testBitBltEmptyBufferedImageType3ByteBGRbackgroundMagenta(TestImage image, Graphics2D graphics2d)
-    {
-        return doBitBltEmptyBufferedImageType3ByteRGB(image, graphics2d, Color.magenta);
-    }
-
-    /**
-     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
-     * Background color is set to Color.yellow.
-     *
-     * @param image
-     *            image to be used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    public TestResult testBitBltEmptyBufferedImageType3ByteBGRbackgroundYellow(TestImage image, Graphics2D graphics2d)
-    {
-        return doBitBltEmptyBufferedImageType3ByteRGB(image, graphics2d, Color.yellow);
-    }
-
-    /**
-     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
-     * Background color is set to Color.white.
-     *
-     * @param image
-     *            image to be used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    public TestResult testBitBltEmptyBufferedImageType3ByteBGRbackgroundWhite(TestImage image, Graphics2D graphics2d)
-    {
-        return doBitBltEmptyBufferedImageType3ByteRGB(image, graphics2d, Color.white);
-    }
-
-    /**
-     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
-     * Background color is set to Color.black.
-     *
-     * @param image
-     *            image to be used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    public TestResult testBitBltEmptyBufferedImageType4ByteABGRbackgroundBlack(TestImage image, Graphics2D graphics2d)
-    {
-        return doBitBltEmptyBufferedImageType4ByteABGR(image, graphics2d, Color.black);
-    }
-
-    /**
-     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
-     * Background color is set to Color.blue.
-     *
-     * @param image
-     *            image to be used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    public TestResult testBitBltEmptyBufferedImageType4ByteABGRbackgroundBlue(TestImage image, Graphics2D graphics2d)
-    {
-        return doBitBltEmptyBufferedImageType4ByteABGR(image, graphics2d, Color.blue);
-    }
-
-    /**
-     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
-     * Background color is set to Color.green.
-     *
-     * @param image
-     *            image to be used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    public TestResult testBitBltEmptyBufferedImageType4ByteABGRbackgroundGreen(TestImage image, Graphics2D graphics2d)
-    {
-        return doBitBltEmptyBufferedImageType4ByteABGR(image, graphics2d, Color.green);
-    }
-
-    /**
-     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
-     * Background color is set to Color.cyan.
-     *
-     * @param image
-     *            image to be used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    public TestResult testBitBltEmptyBufferedImageType4ByteABGRbackgroundCyan(TestImage image, Graphics2D graphics2d)
-    {
-        return doBitBltEmptyBufferedImageType4ByteABGR(image, graphics2d, Color.cyan);
-    }
-
-    /**
-     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
-     * Background color is set to Color.red.
-     *
-     * @param image
-     *            image to be used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    public TestResult testBitBltEmptyBufferedImageType4ByteABGRbackgroundRed(TestImage image, Graphics2D graphics2d)
-    {
-        return doBitBltEmptyBufferedImageType4ByteABGR(image, graphics2d, Color.red);
-    }
-
-    /**
-     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
-     * Background color is set to Color.magenta.
-     *
-     * @param image
-     *            image to be used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    public TestResult testBitBltEmptyBufferedImageType4ByteABGRbackgroundMagenta(TestImage image, Graphics2D graphics2d)
-    {
-        return doBitBltEmptyBufferedImageType4ByteABGR(image, graphics2d, Color.magenta);
-    }
-
-    /**
-     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
-     * Background color is set to Color.yellow.
-     *
-     * @param image
-     *            image to be used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    public TestResult testBitBltEmptyBufferedImageType4ByteABGRbackgroundYellow(TestImage image, Graphics2D graphics2d)
-    {
-        return doBitBltEmptyBufferedImageType4ByteABGR(image, graphics2d, Color.yellow);
-    }
-
-    /**
-     * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
-     * Background color is set to Color.white.
-     *
-     * @param image
-     *            image to be used as a destination for BitBlt-type operations
-     * @param graphics2d
-     *            graphics canvas
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    public TestResult testBitBltEmptyBufferedImageType4ByteABGRbackgroundWhite(TestImage image, Graphics2D graphics2d)
-    {
-        return doBitBltEmptyBufferedImageType4ByteABGR(image, graphics2d, Color.white);
+     * Test basic BitBlt operation for horizontal stripes buffered image with type {@link BufferedImage#TYPE_INT_BGR}.
+     *
+     * @param image
+     *            image to be used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @param backgroundColor
+     *            background color
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    private TestResult doBitBltHorizontalStripesBufferedImageTypeIntBGR(TestImage image, Graphics2D graphics2d,
+                    Color backgroundColor)
+    {
+        return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_BGR, backgroundColor);
+    }
+
+    /**
+     * Test basic BitBlt operation for horizontal stripes buffered image with type {@link BufferedImage#TYPE_INT_RGB}.
+     *
+     * @param image
+     *            image to be used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @param backgroundColor
+     *            background color
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    private TestResult doBitBltHorizontalStripesBufferedImageTypeIntRGB(TestImage image, Graphics2D graphics2d,
+                    Color backgroundColor)
+    {
+        return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, backgroundColor);
+    }
+
+    /**
+     * Test basic BitBlt operation for horizontal stripes buffered image with type {@link BufferedImage#TYPE_BYTE_BINARY}.
+     *
+     * @param image
+     *            image to be used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @param backgroundColor
+     *            background color
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    private TestResult doBitBltHorizontalStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d,
+                    Color backgroundColor)
+    {
+        return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, backgroundColor);
+    }
+
+    /**
+     * Test basic BitBlt operation for horizontal stripes buffered image with type {@link BufferedImage#TYPE_BYTE_GRAY}.
+     *
+     * @param image
+     *            image to be used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @param backgroundColor
+     *            background color
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    private TestResult doBitBltHorizontalStripesBufferedImageTypeByteGray(TestImage image, Graphics2D graphics2d,
+                    Color backgroundColor)
+    {
+        return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY, backgroundColor);
+    }
+
+    /**
+     * Test basic BitBlt operation for horizontal stripes buffered image with type {@link BufferedImage#TYPE_BYTE_INDEXED}.
+     *
+     * @param image
+     *            image to be used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @param backgroundColor
+     *            background color
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    private TestResult doBitBltHorizontalStripesBufferedImageTypeByteIndexed(TestImage image, Graphics2D graphics2d,
+                    Color backgroundColor)
+    {
+        return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_INDEXED, backgroundColor);
+    }
+
+    /**
+     * Test basic BitBlt operation for horizontal stripes buffered image with type {@link BufferedImage#TYPE_USHORT_555_RGB}.
+     *
+     * @param image
+     *            image to be used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @param backgroundColor
+     *            background color
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    private TestResult doBitBltHorizontalStripesBufferedImageTypeUshort555RGB(TestImage image, Graphics2D graphics2d,
+                    Color backgroundColor)
+    {
+        return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB, backgroundColor);
+    }
+
+    /**
+     * Test basic BitBlt operation for horizontal stripes buffered image with type {@link BufferedImage#TYPE_USHORT_565_RGB}.
+     *
+     * @param image
+     *            image to be used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @param backgroundColor
+     *            background color
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    private TestResult doBitBltHorizontalStripesBufferedImageTypeUshort565RGB(TestImage image, Graphics2D graphics2d,
+                    Color backgroundColor)
+    {
+        return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB, backgroundColor);
+    }
+
+    /**
+     * Test basic BitBlt operation for horizontal stripes buffered image with type {@link BufferedImage#TYPE_USHORT_GRAY}.
+     *
+     * @param image
+     *            image to be used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @param backgroundColor
+     *            background color
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    private TestResult doBitBltHorizontalStripesBufferedImageTypeUshortGray(TestImage image, Graphics2D graphics2d,
+                    Color backgroundColor)
+    {
+        return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY, backgroundColor);
+    }
+
+    /**
+     * Test basic BitBlt operation for horizontal stripes buffered image with type {@link BufferedImage#TYPE_CUSTOM}.
+     *
+     * @param image
+     *            image to be used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @param backgroundColor
+     *            background color
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    private TestResult doBitBltHorizontalStripesBufferedImageTypeCustom(TestImage image, Graphics2D graphics2d,
+                    Color backgroundColor)
+    {
+        return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_CUSTOM, backgroundColor);
+    }
+
+    /**
+     * Test basic BitBlt operation for vertical stripes buffered image with type {@link BufferedImage#TYPE_3BYTE_BGR}.
+     *
+     * @param image
+     *            image to be used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @param backgroundColor
+     *            background color
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    private TestResult doBitBltVerticalStripesBufferedImageType3ByteBGR(TestImage image, Graphics2D graphics2d,
+                    Color backgroundColor)
+    {
+        return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, backgroundColor);
+    }
+
+    /**
+     * Test basic BitBlt operation for vertical stripes buffered image with type {@link BufferedImage#TYPE_4BYTE_ABGR}.
+     *
+     * @param image
+     *            image to be used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @param backgroundColor
+     *            background color
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    private TestResult doBitBltVerticalStripesBufferedImageType4ByteABGR(TestImage image, Graphics2D graphics2d,
+                    Color backgroundColor)
+    {
+        return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR, backgroundColor);
+    }
+
+    /**
+     * Test basic BitBlt operation for vertical stripes buffered image with type {@link BufferedImage#TYPE_4BYTE_ABGR_PRE}.
+     *
+     * @param image
+     *            image to be used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @param backgroundColor
+     *            background color
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    private TestResult doBitBltVerticalStripesBufferedImageType4ByteABGR_Pre(TestImage image, Graphics2D graphics2d,
+                    Color backgroundColor)
+    {
+        return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE, backgroundColor);
+    }
+
+    /**
+     * Test basic BitBlt operation for vertical stripes buffered image with type {@link BufferedImage#TYPE_INT_ARGB}.
+     *
+     * @param image
+     *            image to be used as a destination for BitBlt-type operations
+     * @param graphics2d
+     *            graphics canvas
+     * @param backgroundColor
+     *            background color
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    private TestResult doBitBltVerticalStripesBufferedImageTypeIntARGB(TestImage image, Graphics2D graphics2d,
+                    Color backgroundColor)
+    {
+        return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB, backgroundColor);
     }
 
     /**