From 88d99df31f4c181b926c61204abf61df9e4960b6 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Fri, 5 Jan 2018 11:58:16 -0500 Subject: [Viewer] Preserve gesture transformation matrix on slide/backend change Change-Id: I417fb9b6d6b7c95884dff6871731883fe3736437 Reviewed-on: https://skia-review.googlesource.com/91460 Reviewed-by: Brian Osman Commit-Queue: Brian Salomon --- src/views/SkTouchGesture.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/views') 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(); -- cgit v1.2.3