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 "Viewer.h" | 8 #include "Viewer.h" |
9 | 9 |
10 #include "GMSlide.h" | 10 #include "GMSlide.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 this->setupCurrentSlide(previousSlide); | 173 this->setupCurrentSlide(previousSlide); |
174 }); | 174 }); |
175 fCommands.addCommand(Window::Key::kUp, "Up", "Transform", "Zoom in", [this](
) { | 175 fCommands.addCommand(Window::Key::kUp, "Up", "Transform", "Zoom in", [this](
) { |
176 this->changeZoomLevel(1.f / 32.f); | 176 this->changeZoomLevel(1.f / 32.f); |
177 fWindow->inval(); | 177 fWindow->inval(); |
178 }); | 178 }); |
179 fCommands.addCommand(Window::Key::kDown, "Down", "Transform", "Zoom out", [t
his]() { | 179 fCommands.addCommand(Window::Key::kDown, "Down", "Transform", "Zoom out", [t
his]() { |
180 this->changeZoomLevel(-1.f / 32.f); | 180 this->changeZoomLevel(-1.f / 32.f); |
181 fWindow->inval(); | 181 fWindow->inval(); |
182 }); | 182 }); |
183 #ifdef SK_BUILD_FOR_WIN | 183 #if defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_MAC) |
184 fCommands.addCommand('d', "Modes", "Change rendering backend", [this]() { | 184 fCommands.addCommand('d', "Modes", "Change rendering backend", [this]() { |
185 if (sk_app::Window::kRaster_BackendType == fBackendType) { | 185 if (sk_app::Window::kRaster_BackendType == fBackendType) { |
186 fBackendType = sk_app::Window::kNativeGL_BackendType; | 186 fBackendType = sk_app::Window::kNativeGL_BackendType; |
187 #ifdef SK_VULKAN | 187 #ifdef SK_VULKAN |
188 } else if (sk_app::Window::kNativeGL_BackendType == fBackendType) { | 188 } else if (sk_app::Window::kNativeGL_BackendType == fBackendType) { |
189 fBackendType = sk_app::Window::kVulkan_BackendType; | 189 fBackendType = sk_app::Window::kVulkan_BackendType; |
190 #endif | 190 #endif |
191 } else { | 191 } else { |
192 fBackendType = sk_app::Window::kRaster_BackendType; | 192 fBackendType = sk_app::Window::kRaster_BackendType; |
193 } | 193 } |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 updateUIState(); | 646 updateUIState(); |
647 } | 647 } |
648 } else if (stateName.equals(kRefreshStateName)) { | 648 } else if (stateName.equals(kRefreshStateName)) { |
649 // This state is actually NOT in the UI state. | 649 // This state is actually NOT in the UI state. |
650 // We use this to allow Android to quickly set bool fRefresh. | 650 // We use this to allow Android to quickly set bool fRefresh. |
651 fRefresh = stateValue.equals(kON); | 651 fRefresh = stateValue.equals(kON); |
652 } else { | 652 } else { |
653 SkDebugf("Unknown stateName: %s", stateName.c_str()); | 653 SkDebugf("Unknown stateName: %s", stateName.c_str()); |
654 } | 654 } |
655 } | 655 } |
OLD | NEW |