[Libreoffice-commits] core.git: Branch 'feature/skia' - vcl/skia
Luboš Luňák (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 30 09:00:43 UTC 2019
vcl/skia/gdiimpl.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 19a1ec8cba304bc95bb7130ce4dfa5733c9c97f5
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Oct 30 09:57:46 2019 +0100
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Wed Oct 30 09:59:33 2019 +0100
use SkPath::kEvenOdd_FillType for polypolygon paths in Skia
Apparently that is the rule LO code uses, seeing e.g. the last screen
in visualbackendtest.
Change-Id: I88da7e96df9748cc6ffb3fbb6901512f59210cab
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 1565f23c98ca..0f07ebd5a1d9 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -260,6 +260,7 @@ static SkRegion toSkRegion(const vcl::Region& region)
{
SkPath path;
lclPolyPolygonToPath(region.GetAsB2DPolyPolygon(), path);
+ path.setFillType(SkPath::kEvenOdd_FillType);
SkRegion skRegion;
skRegion.setPath(path, SkRegion(path.getBounds().roundOut()));
return skRegion;
@@ -298,6 +299,7 @@ bool SkiaSalGraphicsImpl::setClipRegion(const vcl::Region& region)
{
SkPath path;
lclPolyPolygonToPath(region.GetAsB2DPolyPolygon(), path);
+ path.setFillType(SkPath::kEvenOdd_FillType);
canvas->clipPath(path);
}
else
@@ -459,6 +461,7 @@ bool SkiaSalGraphicsImpl::drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectTo
basegfx::B2DPolyPolygon aPolyPolygon(rPolyPolygon);
aPolyPolygon.transform(rObjectToDevice);
lclPolyPolygonToPath(aPolyPolygon, aPath);
+ aPath.setFillType(SkPath::kEvenOdd_FillType);
SkPaint aPaint;
if (mFillColor != SALCOLOR_NONE)
@@ -561,6 +564,7 @@ bool SkiaSalGraphicsImpl::drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDev
SkPath aPath;
lclPolygonToPath(rPolyLine, aPath);
+ aPath.setFillType(SkPath::kEvenOdd_FillType);
SkMatrix matrix = SkMatrix::MakeTrans(0.5, 0.5);
{
SkAutoCanvasRestore autoRestore(mSurface->getCanvas(), true);
@@ -729,6 +733,7 @@ void SkiaSalGraphicsImpl::invert(basegfx::B2DPolygon const& rPoly, SalInvert eFl
{
SkPath aPath;
lclPolygonToPath(rPoly, aPath);
+ aPath.setFillType(SkPath::kEvenOdd_FillType);
SkPaint aPaint;
aPaint.setStrokeWidth(2);
float intervals[] = { 4.0f, 4.0f };
@@ -743,6 +748,7 @@ void SkiaSalGraphicsImpl::invert(basegfx::B2DPolygon const& rPoly, SalInvert eFl
{
SkPath aPath;
lclPolygonToPath(rPoly, aPath);
+ aPath.setFillType(SkPath::kEvenOdd_FillType);
SkPaint aPaint;
aPaint.setColor(SkColorSetARGB(255, 255, 255, 255));
aPaint.setStyle(SkPaint::kFill_Style);
More information about the Libreoffice-commits
mailing list