| Index: tools/viewer/sk_app/Window.cpp
|
| diff --git a/tools/viewer/sk_app/Window.cpp b/tools/viewer/sk_app/Window.cpp
|
| index 47053be5afc5a503f398316238bdda317fd94ead..997500c51599b40614f6f80e571dcf051743117e 100644
|
| --- a/tools/viewer/sk_app/Window.cpp
|
| +++ b/tools/viewer/sk_app/Window.cpp
|
| @@ -27,11 +27,17 @@ static bool default_mouse_func(int x, int y, Window::InputState state, uint32_t
|
| return false;
|
| }
|
|
|
| +static bool default_touch_func(int owner, Window::InputState state, float x, float y,
|
| + void* userData) {
|
| + return false;
|
| +}
|
| +
|
| static void default_paint_func(SkCanvas*, void* userData) {}
|
|
|
| Window::Window() : fCharFunc(default_char_func)
|
| , fKeyFunc(default_key_func)
|
| , fMouseFunc(default_mouse_func)
|
| + , fTouchFunc(default_touch_func)
|
| , fPaintFunc(default_paint_func) {
|
| }
|
|
|
| @@ -52,6 +58,10 @@ bool Window::onMouse(int x, int y, InputState state, uint32_t modifiers) {
|
| return fMouseFunc(x, y, state, modifiers, fMouseUserData);
|
| }
|
|
|
| +bool Window::onTouch(int owner, InputState state, float x, float y) {
|
| + return fTouchFunc(owner, state, x, y, fTouchUserData);
|
| +}
|
| +
|
| void Window::onPaint() {
|
| SkSurface* backbuffer = fWindowContext->getBackbufferSurface();
|
| if (backbuffer) {
|
|
|