aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/sksg/geometry/SkSGPath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/sksg/geometry/SkSGPath.cpp')
-rw-r--r--experimental/sksg/geometry/SkSGPath.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/experimental/sksg/geometry/SkSGPath.cpp b/experimental/sksg/geometry/SkSGPath.cpp
index 8d5a25373a..230442d409 100644
--- a/experimental/sksg/geometry/SkSGPath.cpp
+++ b/experimental/sksg/geometry/SkSGPath.cpp
@@ -9,6 +9,7 @@
#include "SkCanvas.h"
#include "SkPaint.h"
+#include "SkRectPriv.h"
namespace sksg {
@@ -25,7 +26,12 @@ void Path::onDraw(SkCanvas* canvas, const SkPaint& paint) const {
SkRect Path::onRevalidate(InvalidationController*, const SkMatrix&) {
SkASSERT(this->hasInval());
- return fPath.computeTightBounds();
+ const auto ft = fPath.getFillType();
+ return (ft == SkPath::kWinding_FillType || ft == SkPath::kEvenOdd_FillType)
+ // "Containing" fills have finite bounds.
+ ? fPath.computeTightBounds()
+ // Inverse fills are "infinite".
+ : SkRectPriv::MakeLargeS32();
}
SkPath Path::onAsPath() const {