aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2018-04-05 15:15:59 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-05 19:47:48 +0000
commit6127c4c660270ed5cae2d925add80951605176ea (patch)
tree28f7b48ef368aebc809e5558a6997afd95317ee7 /tools
parent93e4ea52f66320685d3bcd1d613d6cf36de5e080 (diff)
Clip SlideDir slides to their declared dimensions
(to avoid spilling cell content) TBR= Change-Id: I7bbbbf004d35faab5f264d9914bcd24d2bb8eaeb Reviewed-on: https://skia-review.googlesource.com/118984 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/viewer/SlideDir.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/viewer/SlideDir.cpp b/tools/viewer/SlideDir.cpp
index ba3bbbae12..1da6df4678 100644
--- a/tools/viewer/SlideDir.cpp
+++ b/tools/viewer/SlideDir.cpp
@@ -72,6 +72,8 @@ protected:
}
void onRender(SkCanvas* canvas) const override {
+ SkAutoCanvasRestore acr(canvas, true);
+ canvas->clipRect(SkRect::Make(fSlide->getDimensions()), true);
fSlide->draw(canvas);
}