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

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: Rebased and reformatted 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
« no previous file with comments | « headless/lib/headless_browser_browsertest.cc ('k') | headless/public/headless_browser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e75ad458432ead080d9af2726707370ce6a21108..193169ff8a0054b1c37ae94e3681165a451e9a26 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 {
@@ -51,8 +52,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;
« no previous file with comments | « headless/lib/headless_browser_browsertest.cc ('k') | headless/public/headless_browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698