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

Unified Diff: tools/viewer/Viewer.h

Issue 1982643004: Implement touch control (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: SkMutex 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.h
diff --git a/tools/viewer/Viewer.h b/tools/viewer/Viewer.h
index 033bd6969b9684a7c8d10ca474583876e0456b49..13cfada9d205a08372ef101f2b51c5be80bf3460 100644
--- a/tools/viewer/Viewer.h
+++ b/tools/viewer/Viewer.h
@@ -24,6 +24,7 @@ public:
void onPaint(SkCanvas* canvas);
void onIdle(double ms) override;
+ bool onTouch(int owner, sk_app::Window::InputState state, float x, float y);
private:
void initSlides();
@@ -33,7 +34,7 @@ private:
void drawStats(SkCanvas* canvas);
void changeZoomLevel(float delta);
- void updateMatrix();
+ SkMatrix computeMatrix();
sk_app::Window* fWindow;
@@ -48,13 +49,14 @@ private:
bool fDisplayStats;
// transform data
- SkMatrix fLocalMatrix;
SkScalar fZoomCenterX;
SkScalar fZoomCenterY;
SkScalar fZoomLevel;
SkScalar fZoomScale;
sk_app::CommandSet fCommands;
+
+ SkTouchGesture fGesture;
};
« no previous file with comments | « platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/ViewerActivity.java ('k') | tools/viewer/Viewer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698