Index: tools/viewer/Viewer.cpp |
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp |
index c4b8b26dc51e3fda5a43a66962f5dba0a397de0d..b450f2192d8a6dc2d8fb5f9796564fef955ee2d6 100644 |
--- a/tools/viewer/Viewer.cpp |
+++ b/tools/viewer/Viewer.cpp |
@@ -35,7 +35,7 @@ static bool on_touch_handler(int owner, Window::InputState state, float x, float |
return viewer->onTouch(owner, state, x, y); |
} |
-DEFINE_bool2(fullscreen, f, true, "Run fullscreen."); |
+DEFINE_bool2(fullscreen, f, false, "Run fullscreen."); |
DEFINE_string(key, "", "Space-separated key/value pairs to add to JSON identifying this builder."); |
DEFINE_string2(match, m, nullptr, |
"[~][^]substring[$] [...] of bench name to run.\n" |
@@ -47,6 +47,7 @@ DEFINE_string2(match, m, nullptr, |
"If a bench does not match any list entry,\n" |
"it is skipped unless some list entry starts with ~"); |
DEFINE_string(skps, "skps", "Directory to read skps from."); |
+DEFINE_bool(vulkan, true, "Run with Vulkan."); |
const char *kBackendTypeStrings[sk_app::Window::kBackendTypeCount] = { |
" [OpenGL]", |
@@ -72,6 +73,9 @@ Viewer::Viewer(int argc, char** argv, void* platformData) |
SkCommandLineFlags::Parse(argc, argv); |
+ fBackendType = FLAGS_vulkan ? sk_app::Window::kVulkan_BackendType |
+ : sk_app::Window::kNativeGL_BackendType; |
+ |
fWindow = Window::CreateNativeWindow(platformData); |
fWindow->attach(fBackendType, DisplayParams()); |
@@ -117,6 +121,7 @@ Viewer::Viewer(int argc, char** argv, void* platformData) |
this->changeZoomLevel(-1.f / 32.f); |
fWindow->inval(); |
}); |
+#if 0 // this doesn't seem to work on any platform right now |
#ifndef SK_BUILD_FOR_ANDROID |
fCommands.addCommand('d', "Modes", "Change rendering backend", [this]() { |
fWindow->detach(); |
@@ -124,15 +129,17 @@ Viewer::Viewer(int argc, char** argv, void* platformData) |
if (sk_app::Window::kVulkan_BackendType == fBackendType) { |
fBackendType = sk_app::Window::kNativeGL_BackendType; |
} |
- // TODO: get Vulkan -> OpenGL working without swapchain creation failure |
+ // TODO: get Vulkan -> OpenGL working on Windows without swapchain creation failure |
//else if (sk_app::Window::kNativeGL_BackendType == fBackendType) { |
// fBackendType = sk_app::Window::kVulkan_BackendType; |
//} |
fWindow->attach(fBackendType, DisplayParams()); |
this->updateTitle(); |
+ fWindow->inval(); |
}); |
#endif |
+#endif |
// set up slides |
this->initSlides(); |