Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: tools/viewer/Viewer.cpp

Issue 2228883003: Add RasterWindowContext_mac (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment; enable backend switching Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/viewer/sk_app/mac/RasterWindowContext_mac.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | tools/viewer/sk_app/mac/RasterWindowContext_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698