[skotty] Adjust Draw node bounds for paint
TBR=
Change-Id: I88b3fe9c0ed4be2244b82d78995d6e27fa022296
Reviewed-on: https://skia-review.googlesource.com/93301
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
diff --git a/experimental/sksg/SkSGDraw.cpp b/experimental/sksg/SkSGDraw.cpp
index efeee05..14f844a 100644
--- a/experimental/sksg/SkSGDraw.cpp
+++ b/experimental/sksg/SkSGDraw.cpp
@@ -32,11 +32,13 @@
SkRect Draw::onRevalidate(InvalidationController* ic, const SkMatrix& ctm) {
SkASSERT(this->hasInval());
- // TODO: adjust bounds for paint
- const auto bounds = fGeometry->revalidate(ic, ctm);
+ auto bounds = fGeometry->revalidate(ic, ctm);
fPaint->revalidate(ic, ctm);
- return bounds;
+ const auto& paint = fPaint->makePaint();
+ SkASSERT(paint.canComputeFastBounds());
+
+ return paint.computeFastBounds(bounds, &bounds);
}
} // namespace sksg