[Libreoffice-commits] core.git: vcl/source
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Fri Nov 13 15:05:39 UTC 2020
vcl/source/outdev/gradient.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit c98467b7069ff06a8ff42832c3f2bdf193c487bd
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Nov 12 15:38:43 2020 +0100
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Fri Nov 13 16:04:54 2020 +0100
properly clip native VCL gradients (tdf#137563)
If I'm getting it right, OutputDevice::InitClipRegion() sets
mbOutputClipped = true if the entire output would be clipped,
and it doesn't call SalGraphics::SetClipRegion() at all, instead
OutputDevice draw calls are supposed to avoid the drawing entirely.
But while the polygon fallback in OutputDevice::DrawGradient()
does so, the call to SalGraphics::DrawGradient() didn't.
Change-Id: Ib93bcad98534a3a3d9be26cdea11def51c796f00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105759
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 32852eefc34e..f37bad807845 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -106,7 +106,8 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
InitClipRegion();
// try to draw gradient natively
- bDrawn = mpGraphics->DrawGradient( aClixPolyPoly, aGradient );
+ if (!mbOutputClipped)
+ bDrawn = mpGraphics->DrawGradient( aClixPolyPoly, aGradient );
if (!bDrawn && !mbOutputClipped)
{
More information about the Libreoffice-commits
mailing list