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

Unified Diff: headless/lib/headless_content_main_delegate.cc

Issue 2184763002: headless: Enable GL support by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
Index: headless/lib/headless_content_main_delegate.cc
diff --git a/headless/lib/headless_content_main_delegate.cc b/headless/lib/headless_content_main_delegate.cc
index 97d04130d775c600260681e950beeeec0d531f50..381c41b9ce695ca07313844d89c440696dd1bea2 100644
--- a/headless/lib/headless_content_main_delegate.cc
+++ b/headless/lib/headless_content_main_delegate.cc
@@ -15,6 +15,7 @@
#include "headless/lib/renderer/headless_content_renderer_client.h"
#include "headless/lib/utility/headless_content_utility_client.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/gl/gl_switches.h"
#include "ui/ozone/public/ozone_switches.h"
namespace headless {
@@ -48,8 +49,12 @@ bool HeadlessContentMainDelegate::BasicStartupComplete(int* exit_code) {
// adding it here allows us to run in a non-headless build too.
command_line->AppendSwitchASCII(switches::kOzonePlatform, "headless");
- // TODO(skyostil): Investigate using Mesa/SwiftShader for output.
- command_line->AppendSwitch(switches::kDisableGpu);
+ if (!browser_->options()->gl_implementation.empty()) {
+ command_line->AppendSwitchASCII(switches::kUseGL,
+ browser_->options()->gl_implementation);
+ } else {
+ command_line->AppendSwitch(switches::kDisableGpu);
+ }
SetContentClient(&content_client_);
return false;

Powered by Google App Engine
This is Rietveld 408576698