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 #include "Window_android.h" | 8 #include "Window_android.h" |
9 | 9 |
10 #include "VulkanTestContext_android.h" | 10 #include "VulkanTestContext_android.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 mApp->onAppCmd = handle_cmd; | 28 mApp->onAppCmd = handle_cmd; |
29 mApp->onInputEvent = handle_input; | 29 mApp->onInputEvent = handle_input; |
30 return true; | 30 return true; |
31 } | 31 } |
32 | 32 |
33 void Window_android::setTitle(const char* title) { | 33 void Window_android::setTitle(const char* title) { |
34 //todo | 34 //todo |
35 SkDebugf("Title: %s", title); | 35 SkDebugf("Title: %s", title); |
36 } | 36 } |
37 | 37 |
38 bool Window_android::attach(BackEndType attachType, int msaaSampleCount, Attachm
entInfo*) { | 38 bool Window_android::attach(BackEndType attachType, int msaaSampleCount) { |
39 if (kVulkan_BackendType != attachType) { | 39 if (kVulkan_BackendType != attachType) { |
40 return false; | 40 return false; |
41 } | 41 } |
42 | 42 |
43 mSampleCount = msaaSampleCount; | 43 mSampleCount = msaaSampleCount; |
44 | 44 |
45 // We delay the creation of fTestContext until Android informs us that | 45 // We delay the creation of fTestContext until Android informs us that |
46 // the native window is ready to use. | 46 // the native window is ready to use. |
47 return true; | 47 return true; |
48 } | 48 } |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 break; | 170 break; |
171 case AINPUT_EVENT_TYPE_KEY: | 171 case AINPUT_EVENT_TYPE_KEY: |
172 Window::Key key = get_key(AKeyEvent_getKeyCode(event)); | 172 Window::Key key = get_key(AKeyEvent_getKeyCode(event)); |
173 Window::InputState state = get_action(AKeyEvent_getAction(event)); | 173 Window::InputState state = get_action(AKeyEvent_getAction(event)); |
174 int32_t mod = get_key_modifiers(event); | 174 int32_t mod = get_key_modifiers(event); |
175 window->onKey(key, state, mod); | 175 window->onKey(key, state, mod); |
176 return true; // eat all key events | 176 return true; // eat all key events |
177 } | 177 } |
178 return 0; | 178 return 0; |
179 } | 179 } |
OLD | NEW |