aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/viewer/SkottieSlide.cpp
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2018-02-20 16:49:20 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-20 22:12:43 +0000
commit60d3bfcef5e9cbe2f1a2d108deb363a8899c1488 (patch)
tree729af3adc5fee4ef7c1b21f29f819520a06e02aa /tools/viewer/SkottieSlide.cpp
parentcbb85a7275155f4fabde0ade8e9590af197a6869 (diff)
[skottie] Show inval rects on mouse click in SkottieSlide
Also fix a SlideDir sizing bug. TBR= Change-Id: Iee61bb6665dc56ddd6fc062a686a9c0ef87dea92 Reviewed-on: https://skia-review.googlesource.com/108902 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'tools/viewer/SkottieSlide.cpp')
-rw-r--r--tools/viewer/SkottieSlide.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/viewer/SkottieSlide.cpp b/tools/viewer/SkottieSlide.cpp
index 063330e925..a364bb1099 100644
--- a/tools/viewer/SkottieSlide.cpp
+++ b/tools/viewer/SkottieSlide.cpp
@@ -77,3 +77,16 @@ bool SkottieSlide::onChar(SkUnichar c) {
return INHERITED::onChar(c);
}
+
+bool SkottieSlide::onMouse(SkScalar x, SkScalar y, sk_app::Window::InputState state, uint32_t) {
+ switch (state) {
+ case sk_app::Window::kUp_InputState:
+ fShowAnimationInval = !fShowAnimationInval;
+ fAnimation->setShowInval(fShowAnimationInval);
+ break;
+ default:
+ break;
+ }
+
+ return true;
+}