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

Unified Diff: tools/viewer/Viewer.cpp

Issue 2067023002: Enable viewer in non-Vulkan builds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Only include XCB if using Vulkan Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/viewer.gyp ('k') | tools/viewer/sk_app/Window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/viewer/Viewer.cpp
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index 010a9140d719cfa514b73988793500f3a9935a20..0ed7e26f0a940e635d455b6a4ed19d0ccf2e1110 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -69,7 +69,9 @@ DEFINE_bool(vulkan, true, "Run with Vulkan.");
const char *kBackendTypeStrings[sk_app::Window::kBackendTypeCount] = {
" [OpenGL]",
+#ifdef SK_VULKAN
" [Vulkan]",
+#endif
" [Raster]"
};
@@ -89,7 +91,7 @@ Viewer::Viewer(int argc, char** argv, void* platformData)
: fCurrentMeasurement(0)
, fDisplayStats(false)
, fSplitScreen(false)
- , fBackendType(sk_app::Window::kVulkan_BackendType)
+ , fBackendType(sk_app::Window::kNativeGL_BackendType)
, fZoomCenterX(0.0f)
, fZoomCenterY(0.0f)
, fZoomLevel(0.0f)
@@ -105,9 +107,10 @@ Viewer::Viewer(int argc, char** argv, void* platformData)
SkCommandLineFlags::Parse(argc, argv);
+#ifdef SK_VULKAN
fBackendType = FLAGS_vulkan ? sk_app::Window::kVulkan_BackendType
: sk_app::Window::kNativeGL_BackendType;
-
+#endif
fWindow = Window::CreateNativeWindow(platformData);
fWindow->attach(fBackendType, DisplayParams());
« no previous file with comments | « gyp/viewer.gyp ('k') | tools/viewer/sk_app/Window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698