OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef VulkanViewer_DEFINED | 8 #ifndef VulkanViewer_DEFINED |
9 #define VulkanViewer_DEFINED | 9 #define VulkanViewer_DEFINED |
10 | 10 |
11 #include "../Application.h" | 11 #include "../Application.h" |
12 #include "InputHandler.h" | |
13 #include "../Window.h" | 12 #include "../Window.h" |
14 #include "gm.h" | 13 #include "gm.h" |
15 | 14 |
16 class SkCanvas; | 15 class SkCanvas; |
17 | 16 |
18 class VulkanViewer : public Application { | 17 class VulkanViewer : public Application { |
19 public: | 18 public: |
20 VulkanViewer(int argc, char** argv, void* platformData); | 19 VulkanViewer(int argc, char** argv, void* platformData); |
21 ~VulkanViewer() override; | 20 ~VulkanViewer() override; |
22 | 21 |
23 bool onKey(int key, bool keyDown); | 22 bool onKey(Window::Key key, Window::InputState state, uint32_t modifiers); |
24 bool onMouse(int x, int y, bool mouseDown); | |
25 void onPaint(SkCanvas* canvas); | 23 void onPaint(SkCanvas* canvas); |
26 | 24 |
27 void onIdle(float dt) override; | 25 void onIdle(float dt) override; |
28 | 26 |
29 private: | 27 private: |
30 Window* fWindow; | 28 Window* fWindow; |
31 InputHandler fInputHandler; | |
32 | 29 |
33 const skiagm::GMRegistry* fGMs; | 30 const skiagm::GMRegistry* fGMs; |
34 }; | 31 }; |
35 | 32 |
36 | 33 |
37 #endif | 34 #endif |
OLD | NEW |