Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Unified Diff: tools/viewer/Viewer.h

Issue 1996613002: Correct gesture scale and translation (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Const Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/viewer/Viewer.cpp » ('j') | tools/viewer/Viewer.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/viewer/Viewer.h
diff --git a/tools/viewer/Viewer.h b/tools/viewer/Viewer.h
index 13cfada9d205a08372ef101f2b51c5be80bf3460..58d253f9587b9712f75002510edce5b7513d8a82 100644
--- a/tools/viewer/Viewer.h
+++ b/tools/viewer/Viewer.h
@@ -57,6 +57,10 @@ private:
sk_app::CommandSet fCommands;
SkTouchGesture fGesture;
+ SkMatrix fPreTouchMatrix;
djsollen 2016/05/19 17:04:23 // identity unless the window initially scales the
liyuqian 2016/05/19 19:23:15 Done.
+ // If fGesture translates the canvas too far (e.g., scroll left 10X than the slide's width),
+ // fOffsetMatrix compensates the gesture translation so the slide never leaves the screen
+ SkMatrix fOffsetMatrix;
};
djsollen 2016/05/19 17:04:23 I don't think we need to store this data.
liyuqian 2016/05/19 19:23:15 Done.
« no previous file with comments | « no previous file | tools/viewer/Viewer.cpp » ('j') | tools/viewer/Viewer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698