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

Unified Diff: tools/viewer/Viewer.cpp

Issue 1982643004: Implement touch control (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
Index: tools/viewer/Viewer.cpp
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index 7dd265e6e2183cd75c4e726410be8a845aa12d41..bf95977122c5c739c2a6098e385fb023abe5925e 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -224,10 +224,8 @@ void Viewer::updateMatrix(){
m.postTranslate(cx, cy);
}
- // TODO: add gesture support
- // Apply any gesture matrix
- //m.preConcat(fGesture.localM());
- //m.preConcat(fGesture.globalM());
+ m.preConcat(fWindow->getGestureLocalM());
+ m.preConcat(fWindow->getGestureGlobalM());
fLocalMatrix = m;
}
@@ -260,6 +258,8 @@ void Viewer::onPaint(SkCanvas* canvas) {
drawStats(canvas);
}
fCommands.drawHelp(canvas);
+
+ updateMatrix();
djsollen 2016/05/16 18:16:00 comment why we need to update the matrix after we
liyuqian 2016/05/16 18:32:37 Done.
}
void Viewer::drawStats(SkCanvas* canvas) {

Powered by Google App Engine
This is Rietveld 408576698