Mercurial > hg > gfx-test
changeset 668:8e79c9f26d53 draft
Added new tests.
author | Pavel Tisnovsky <ptisnovs@redhat.com> |
---|---|
date | Tue, 06 Jan 2015 09:50:15 +0100 |
parents | 2a2ff4b7bf67 |
children | c81da2d131dd |
files | ChangeLog src/org/gfxtest/testsuites/BitBltBufferedImageOp.java src/org/gfxtest/testsuites/BitBltUsingBgColor.java |
diffstat | 3 files changed, 302 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Jan 05 09:35:13 2015 +0100 +++ b/ChangeLog Tue Jan 06 09:50:15 2015 +0100 @@ -1,3 +1,9 @@ +2015-01-06 Pavel Tisnovsky <ptisnovs@redhat.com> + + * src/org/gfxtest/testsuites/BitBltBufferedImageOp.java: + * src/org/gfxtest/testsuites/BitBltUsingBgColor.java: + Added new tests. + 2015-01-05 Pavel Tisnovsky <ptisnovs@redhat.com> * src/org/gfxtest/testsuites/BitBltBufferedImageOp.java:
--- a/src/org/gfxtest/testsuites/BitBltBufferedImageOp.java Mon Jan 05 09:35:13 2015 +0100 +++ b/src/org/gfxtest/testsuites/BitBltBufferedImageOp.java Tue Jan 06 09:50:15 2015 +0100 @@ -6051,6 +6051,166 @@ } /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_BYTE_GRAY}. + * + * @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 + */ + protected TestResult doBitBltRGBTexture1TypeByteGray(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithRGBTexture1Image(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_INT_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 + */ + protected TestResult doBitBltRGBTexture1TypeIntBGR(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithRGBTexture1Image(image, graphics2d, BufferedImage.TYPE_INT_BGR, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_INT_RGB}. + * + * @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 + */ + protected TestResult doBitBltRGBTexture1TypeIntRGB(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithRGBTexture1Image(image, graphics2d, BufferedImage.TYPE_INT_RGB, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_INT_ARGB}. + * + * @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 + */ + protected TestResult doBitBltRGBTexture1TypeIntARGB(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithRGBTexture1Image(image, graphics2d, BufferedImage.TYPE_INT_ARGB, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_INT_ARGB_PRE}. + * + * @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 + */ + protected TestResult doBitBltRGBTexture1TypeIntARGB_Pre(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithRGBTexture1Image(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_USHORT_555_RGB}. + * + * @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 + */ + protected TestResult doBitBltRGBTexture1TypeUshort555RGB(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithRGBTexture1Image(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_USHORT_565_RGB}. + * + * @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 + */ + protected TestResult doBitBltRGBTexture1TypeUshort565RGB(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithRGBTexture1Image(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_USHORT_GRAY}. + * + * @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 + */ + protected TestResult doBitBltRGBTexture1TypeUshortGray(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithRGBTexture1Image(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#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 + */ + protected TestResult doBitBltRGBTexture2Type3ByteBGR(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithRGBTexture2Image(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#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 + */ + protected TestResult doBitBltRGBTexture2Type4ByteABGR(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithRGBTexture2Image(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR, rasterOp); + } + + /** * Entry point to the test suite. * * @param args not used in this case
--- a/src/org/gfxtest/testsuites/BitBltUsingBgColor.java Mon Jan 05 09:35:13 2015 +0100 +++ b/src/org/gfxtest/testsuites/BitBltUsingBgColor.java Tue Jan 06 09:50:15 2015 +0100 @@ -1578,6 +1578,142 @@ } /** + * Test basic BitBlt operation for vertical stripes buffered image with type {@link BufferedImage#TYPE_INT_ARGB_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 doBitBltVerticalStripesBufferedImageTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d, + Color backgroundColor) + { + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE, backgroundColor); + } + + /** + * Test basic BitBlt operation for vertical 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 doBitBltVerticalStripesBufferedImageTypeIntBGR(TestImage image, Graphics2D graphics2d, + Color backgroundColor) + { + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_BGR, backgroundColor); + } + + /** + * Test basic BitBlt operation for vertical 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 doBitBltVerticalStripesBufferedImageTypeIntRGB(TestImage image, Graphics2D graphics2d, + Color backgroundColor) + { + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, backgroundColor); + } + + /** + * Test basic BitBlt operation for vertical 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 doBitBltVerticalStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d, + Color backgroundColor) + { + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, backgroundColor); + } + + /** + * Test basic BitBlt operation for vertical 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 doBitBltVerticalStripesBufferedImageTypeByteGray(TestImage image, Graphics2D graphics2d, + Color backgroundColor) + { + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY, backgroundColor); + } + + /** + * Test basic BitBlt operation for vertical 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 doBitBltVerticalStripesBufferedImageTypeByteIndexed(TestImage image, Graphics2D graphics2d, + Color backgroundColor) + { + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_INDEXED, backgroundColor); + } + + /** + * Test basic BitBlt operation for vertical 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 doBitBltVerticalStripesBufferedImageTypeUshort555RGB(TestImage image, Graphics2D graphics2d, + Color backgroundColor) + { + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB, backgroundColor); + } + + /** + * Test basic BitBlt operation for vertical 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 doBitBltVerticalStripesBufferedImageTypeUshort565RGB(TestImage image, Graphics2D graphics2d, + Color backgroundColor) + { + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB, backgroundColor); + } + + /** * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR_Pre. * Background color is set to Color.black. *