Chromium Code Reviews| Index: tools/viewer/sk_app/Window.h |
| diff --git a/tools/viewer/sk_app/Window.h b/tools/viewer/sk_app/Window.h |
| index f233f131a5eb15f1ce6bf5865502c3a339291197..c61601495fe346c0e6b9afd8c54dd6042aae85c9 100644 |
| --- a/tools/viewer/sk_app/Window.h |
| +++ b/tools/viewer/sk_app/Window.h |
| @@ -11,6 +11,7 @@ |
| #include "DisplayParams.h" |
| #include "SkTypes.h" |
| #include "SkRect.h" |
| +#include "SkTouchGesture.h" |
| class SkCanvas; |
| @@ -124,6 +125,7 @@ public: |
| bool onChar(SkUnichar c, uint32_t modifiers); |
| bool onKey(Key key, InputState state, uint32_t modifiers); |
| bool onMouse(int x, int y, InputState state, uint32_t modifiers); |
| + bool onTouch(int owner, InputState state, float x, float y); // multi-owner = multi-touch |
| void onPaint(); |
| void onResize(uint32_t width, uint32_t height); |
| @@ -133,6 +135,9 @@ public: |
| virtual const DisplayParams& getDisplayParams(); |
| void setDisplayParams(const DisplayParams& params); |
| + const SkMatrix& getGestureLocalM(); |
|
djsollen
2016/05/16 18:16:00
why can't this function be const as well?
liyuqian
2016/05/16 18:32:37
Because SkTouchGesture's globalM has const while i
|
| + const SkMatrix& getGestureGlobalM() const; |
| + |
| protected: |
| Window(); |
| @@ -148,7 +153,9 @@ protected: |
| OnPaintFunc fPaintFunc; |
| void* fPaintUserData; |
| - WindowContext* fWindowContext; |
| + WindowContext* fWindowContext = nullptr; |
| + |
| + SkTouchGesture fGesture; |
| }; |
| } // namespace sk_app |