diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-03-04 15:35:44 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-03-08 13:46:36 +0100 |
commit | 6b8c157a0b4f37a09fdbf656919b2df06a3abc3e (patch) | |
tree | 52451b3b5152511cb4fb68a2f09867bc9db85592 /sw | |
parent | db2e9619397f1e53232824a649b5ad0ba3dd368a (diff) |
make RenderMaskPrimitive2DPixel() clip using clipping (tdf#140797)
The original implementation had this peculiar idea of implementing
clipping using transparency, which slows everything down, because
contents need to be copied and then alpha-blended. Keep that only
for when edges of the clip are to be smoothed.
As a side-effect this also seems to fix tdf#115843 again.
The commit also adjusts the test for tdf#133477 to not rely
on the rounding introduced by the optimization from tdf#115843.
Change-Id: Iebae5996159cf9f17066205985c5b591abdae105
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111966
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter3.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx index fac99e50ffc9..63a322af868e 100644 --- a/sw/qa/extras/uiwriter/uiwriter3.cxx +++ b/sw/qa/extras/uiwriter/uiwriter3.cxx @@ -2555,12 +2555,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133477) aStream.Seek(STREAM_SEEK_TO_BEGIN); // Read it back and check the color of the first pixel. + // (Actually check at one-pixel offset, because imprecise shape positioning may + // result in blending with background for the first pixel). Graphic aGraphic; TypeSerializer aSerializer(aStream); aSerializer.readGraphic(aGraphic); BitmapEx aBitmap = aGraphic.GetBitmapEx(); - CPPUNIT_ASSERT_EQUAL(Color(0, 102, 204), aBitmap.GetPixelColor(0, 0)); + CPPUNIT_ASSERT_EQUAL(Color(0, 102, 204), aBitmap.GetPixelColor(1, 1)); } CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf137964) |