aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2018-01-10 14:00:32 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-11 19:22:35 +0000
commit0401e7ed8e8a462224706aa3dba9a8c867894ee9 (patch)
treefa6d5f3fe14d6a6a77dc72fdbda69d1c603d01a2 /experimental
parent7c4ca043361f6adb3d17a9d3db2397d86bac5a2d (diff)
[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>
Diffstat (limited to 'experimental')
-rw-r--r--experimental/sksg/SkSGDraw.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/experimental/sksg/SkSGDraw.cpp b/experimental/sksg/SkSGDraw.cpp
index efeee0577d..14f844a359 100644
--- a/experimental/sksg/SkSGDraw.cpp
+++ b/experimental/sksg/SkSGDraw.cpp
@@ -32,11 +32,13 @@ void Draw::onRender(SkCanvas* canvas) const {
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