diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-05-22 18:59:33 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-05-22 22:10:00 +0200 |
commit | 7f264f4beec931833b390ae1bbb93b2e22b4ad8a (patch) | |
tree | bb52e49618173c48d67103b0233bbc1dcf832925 /vcl/qa | |
parent | ec11b7330fab72dc56d847c7c3691fddbb18096e (diff) |
always use region band in Skia's setClipRegion (tdf#133208)
Do like other VCL backends do.
Change-Id: I64b5d5a2fb131b41c70aa63eaf84022e9aa9fab5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94702
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/qa')
-rw-r--r-- | vcl/qa/cppunit/BackendTest.cxx | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/vcl/qa/cppunit/BackendTest.cxx b/vcl/qa/cppunit/BackendTest.cxx index 7fa586b7049a..b34dda5262ec 100644 --- a/vcl/qa/cppunit/BackendTest.cxx +++ b/vcl/qa/cppunit/BackendTest.cxx @@ -455,6 +455,46 @@ public: CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed); } + void testClipRectangle() + { + vcl::test::OutputDeviceTestClip aOutDevTest; + Bitmap aBitmap = aOutDevTest.setupClipRectangle(); + auto eResult = vcl::test::OutputDeviceTestClip::checkClip(aBitmap); + exportImage("09-01_clip_rectangle_test.png", aBitmap); + if (SHOULD_ASSERT) + CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed); + } + + void testClipPolygon() + { + vcl::test::OutputDeviceTestClip aOutDevTest; + Bitmap aBitmap = aOutDevTest.setupClipPolygon(); + auto eResult = vcl::test::OutputDeviceTestClip::checkClip(aBitmap); + exportImage("09-02_clip_polygon_test.png", aBitmap); + if (SHOULD_ASSERT) + CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed); + } + + void testClipPolyPolygon() + { + vcl::test::OutputDeviceTestClip aOutDevTest; + Bitmap aBitmap = aOutDevTest.setupClipPolyPolygon(); + auto eResult = vcl::test::OutputDeviceTestClip::checkClip(aBitmap); + exportImage("09-03_clip_polypolygon_test.png", aBitmap); + if (SHOULD_ASSERT) + CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed); + } + + void testClipB2DPolyPolygon() + { + vcl::test::OutputDeviceTestClip aOutDevTest; + Bitmap aBitmap = aOutDevTest.setupClipB2DPolyPolygon(); + auto eResult = vcl::test::OutputDeviceTestClip::checkClip(aBitmap); + exportImage("09-04_clip_b2dpolypolygon_test.png", aBitmap); + if (SHOULD_ASSERT) + CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed); + } + void testTdf124848() { ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT); @@ -530,6 +570,11 @@ public: CPPUNIT_TEST(testDrawBlend); CPPUNIT_TEST(testDrawXor); + CPPUNIT_TEST(testClipRectangle); + CPPUNIT_TEST(testClipPolygon); + CPPUNIT_TEST(testClipPolyPolygon); + CPPUNIT_TEST(testClipB2DPolyPolygon); + CPPUNIT_TEST(testTdf124848); CPPUNIT_TEST_SUITE_END(); |