From 0401e7ed8e8a462224706aa3dba9a8c867894ee9 Mon Sep 17 00:00:00 2001 From: Florin Malita Date: Wed, 10 Jan 2018 14:00:32 -0500 Subject: [skotty] Adjust Draw node bounds for paint TBR= Change-Id: I88b3fe9c0ed4be2244b82d78995d6e27fa022296 Reviewed-on: https://skia-review.googlesource.com/93301 Reviewed-by: Florin Malita Commit-Queue: Florin Malita --- experimental/sksg/SkSGDraw.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'experimental') 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 -- cgit v1.2.3