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

Unified Diff: components/mus/surfaces/surfaces_context_provider.cc

Issue 2097533005: Set Chrome command buffer to be the default GPU command buffer (was mojo command buffer) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added #else 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 | « components/mus/mus_app.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/surfaces/surfaces_context_provider.cc
diff --git a/components/mus/surfaces/surfaces_context_provider.cc b/components/mus/surfaces/surfaces_context_provider.cc
index a30c1aa7072f193b1d734e7d108ab646c341bbe1..cd2928889268098ce7a10f3183e3b48266d4550b 100644
--- a/components/mus/surfaces/surfaces_context_provider.cc
+++ b/components/mus/surfaces/surfaces_context_provider.cc
@@ -11,6 +11,7 @@
#include "base/command_line.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "build/build_config.h"
#include "components/mus/common/switches.h"
#include "components/mus/gles2/command_buffer_driver.h"
#include "components/mus/gles2/command_buffer_impl.h"
@@ -34,9 +35,15 @@ SurfacesContextProvider::SurfacesContextProvider(
delegate_(nullptr),
widget_(widget),
command_buffer_local_(nullptr) {
+// TODO(penghuang): Kludge: Use mojo command buffer when running on Windows
+// since Chrome command buffer breaks unit tests
+#if defined(OS_WIN)
+ use_chrome_gpu_command_buffer_ = false;
+#else
use_chrome_gpu_command_buffer_ =
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kUseChromeGpuCommandBufferInMus);
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kUseMojoGpuCommandBufferInMus);
+#endif
if (!use_chrome_gpu_command_buffer_) {
command_buffer_local_ = new CommandBufferLocal(this, widget_, state);
} else {
« no previous file with comments | « components/mus/mus_app.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698