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

Unified Diff: components/native_viewport/main.cc

Issue 1103413002: Skip gl surface init when headless; enable wm apptests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 5 years, 8 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 | « no previous file | components/native_viewport/public/cpp/args.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/native_viewport/main.cc
diff --git a/components/native_viewport/main.cc b/components/native_viewport/main.cc
index ac74808b3e3390ff134f09289fe996070a9f11cf..1ebfb270df26bcdf2c6dabb935e702953c9372db 100644
--- a/components/native_viewport/main.cc
+++ b/components/native_viewport/main.cc
@@ -37,12 +37,13 @@ class NativeViewportAppDelegate : public mojo::ApplicationDelegate,
tracing_.Initialize(application);
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(mojo::kUseTestConfig))
- gfx::GLSurface::InitializeOneOffForTests();
- else
- gfx::GLSurface::InitializeOneOff();
-
is_headless_ = command_line->HasSwitch(mojo::kUseHeadlessConfig);
+ if (!is_headless_) {
+ if (command_line->HasSwitch(mojo::kUseTestConfig))
+ gfx::GLSurface::InitializeOneOffForTests();
+ else
+ gfx::GLSurface::InitializeOneOff();
+ }
}
bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
« no previous file with comments | « no previous file | components/native_viewport/public/cpp/args.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698