/hg/gfx-test: 2012-01-10 Pavel Tisnovsky <ptisnovs at redhat.com>
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Tue Jan 10 02:01:16 PST 2012
changeset adb101be6e61 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=adb101be6e61
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Jan 10 11:03:38 2012 +0100
2012-01-10 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/BitBltBasicTests.java: Added
eleven new tests.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/BitBltBasicTests.java | 181 ++++++++++++++++++++++-
2 files changed, 180 insertions(+), 6 deletions(-)
diffs (210 lines):
diff -r 662a5e1dcbd5 -r adb101be6e61 ChangeLog
--- a/ChangeLog Fri Jan 06 13:44:05 2012 +0100
+++ b/ChangeLog Tue Jan 10 11:03:38 2012 +0100
@@ -1,3 +1,8 @@
+2012-01-10 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/BitBltBasicTests.java:
+ Added eleven new tests.
+
2012-01-06 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/ClippingPathByRectangleShape.java:
diff -r 662a5e1dcbd5 -r adb101be6e61 src/org/gfxtest/testsuites/BitBltBasicTests.java
--- a/src/org/gfxtest/testsuites/BitBltBasicTests.java Fri Jan 06 13:44:05 2012 +0100
+++ b/src/org/gfxtest/testsuites/BitBltBasicTests.java Tue Jan 10 11:03:38 2012 +0100
@@ -114,6 +114,26 @@
}
/**
+ * Create new buffered image and then do basic BitBlt test.
+ *
+ * @param image
+ * image to which line is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @param type
+ * type of the created image
+ */
+ private TestResult doBitBltTest(TestImage image, Graphics2D graphics2d, int type)
+ {
+ BufferedImage bufferedImage = createBufferedBitmap(type);
+ if (bufferedImage == null)
+ {
+ return TestResult.FAILED;
+ }
+ return BitBlt(image, graphics2d, bufferedImage) ? TestResult.PASSED : TestResult.FAILED;
+ }
+
+ /**
* Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
*
* @param image
@@ -124,12 +144,161 @@
*/
public TestResult testBitBltEmptyBufferedImageType3ByteBGR(TestImage image, Graphics2D graphics2d)
{
- BufferedImage bufferedImage = createBufferedBitmap(BufferedImage.TYPE_3BYTE_BGR);
- if (bufferedImage == null)
- {
- return TestResult.FAILED;
- }
- return BitBlt(image, graphics2d, bufferedImage) ? TestResult.PASSED : TestResult.FAILED;
+ return doBitBltTest(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR.
+ *
+ * @param image
+ * image to which line is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return
+ */
+ public TestResult testBitBltEmptyBufferedImageType4ByteABGR(TestImage image, Graphics2D graphics2d)
+ {
+ return doBitBltTest(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR_PRE.
+ *
+ * @param image
+ * image to which line is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return
+ */
+ public TestResult testBitBltEmptyBufferedImageType4ByteABGR_Pre(TestImage image, Graphics2D graphics2d)
+ {
+ return doBitBltTest(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_BYTE_BINARY.
+ *
+ * @param image
+ * image to which line is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return
+ */
+ public TestResult testBitBltEmptyBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d)
+ {
+ return doBitBltTest(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_INT_RGB.
+ *
+ * @param image
+ * image to which line is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return
+ */
+ public TestResult testBitBltEmptyBufferedImageTypeIntRGB(TestImage image, Graphics2D graphics2d)
+ {
+ return doBitBltTest(image, graphics2d, BufferedImage.TYPE_INT_RGB);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_INT_ARGB.
+ *
+ * @param image
+ * image to which line is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return
+ */
+ public TestResult testBitBltEmptyBufferedImageTypeIntARGB(TestImage image, Graphics2D graphics2d)
+ {
+ return doBitBltTest(image, graphics2d, BufferedImage.TYPE_INT_ARGB);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_INT_ARGB_PRE.
+ *
+ * @param image
+ * image to which line is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return
+ */
+ public TestResult testBitBltEmptyBufferedImageTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d)
+ {
+ return doBitBltTest(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_INT_BGR.
+ *
+ * @param image
+ * image to which line is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return
+ */
+ public TestResult testBitBltEmptyBufferedImageTypeIntBGR(TestImage image, Graphics2D graphics2d)
+ {
+ return doBitBltTest(image, graphics2d, BufferedImage.TYPE_INT_BGR);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_USHORT_565_RGB.
+ *
+ * @param image
+ * image to which line is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return
+ */
+ public TestResult testBitBltEmptyBufferedImageTypeUshort565RGB(TestImage image, Graphics2D graphics2d)
+ {
+ return doBitBltTest(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_USHORT_555_RGB.
+ *
+ * @param image
+ * image to which line is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return
+ */
+ public TestResult testBitBltEmptyBufferedImageTypeUshort555RGB(TestImage image, Graphics2D graphics2d)
+ {
+ return doBitBltTest(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_BYTE_GRAY.
+ *
+ * @param image
+ * image to which line is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return
+ */
+ public TestResult testBitBltEmptyBufferedImageTypeByteGray(TestImage image, Graphics2D graphics2d)
+ {
+ return doBitBltTest(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_USHORT_GRAY.
+ *
+ * @param image
+ * image to which line is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return
+ */
+ public TestResult testBitBltEmptyBufferedImageTypeUshortGray(TestImage image, Graphics2D graphics2d)
+ {
+ return doBitBltTest(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY);
}
/**
More information about the distro-pkg-dev
mailing list