aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/views
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-01-05 11:58:16 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-05 18:18:39 +0000
commit88d99df31f4c181b926c61204abf61df9e4960b6 (patch)
tree2af138ec61d60d37e513e3ffad8aa6afea272a69 /src/views
parent4a577af2d8b177fef873acdfc1915e4f09e3614d (diff)
[Viewer] Preserve gesture transformation matrix on slide/backend change
Change-Id: I417fb9b6d6b7c95884dff6871731883fe3736437 Reviewed-on: https://skia-review.googlesource.com/91460 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/views')
-rw-r--r--src/views/SkTouchGesture.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/views/SkTouchGesture.cpp b/src/views/SkTouchGesture.cpp
index dbcec511b7..4dce06a6f3 100644
--- a/src/views/SkTouchGesture.cpp
+++ b/src/views/SkTouchGesture.cpp
@@ -108,17 +108,21 @@ SkTouchGesture::SkTouchGesture() {
SkTouchGesture::~SkTouchGesture() {
}
-void SkTouchGesture::reset() {
+void SkTouchGesture::resetTouchState() {
fIsTransLimited = false;
fTouches.reset();
fState = kEmpty_State;
fLocalM.reset();
- fGlobalM.reset();
fLastUpMillis = SkTime::GetMSecs() - 2*MAX_DBL_TAP_INTERVAL;
fLastUpP.set(0, 0);
}
+void SkTouchGesture::reset() {
+ fGlobalM.reset();
+ this->resetTouchState();
+}
+
void SkTouchGesture::flushLocalM() {
fGlobalM.postConcat(fLocalM);
fLocalM.reset();