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

Unified Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 2641073004: Revert of [headless] Fix screenshots with gpu enabled. (Closed)
Patch Set: Created 3 years, 11 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 | content/browser/compositor/offscreen_browser_compositor_output_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/gpu_process_transport_factory.cc
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index bf4a6535715b6ac087224d63ae12de77776794b7..4c0f9ee66edc593f0d353b984bf76a6e1bad82a4 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -267,6 +267,10 @@
}
static bool ShouldCreateGpuCompositorFrameSink(ui::Compositor* compositor) {
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kHeadless))
+ return false;
+
#if defined(OS_CHROMEOS)
// Software fallback does not happen on Chrome OS.
return true;
« no previous file with comments | « no previous file | content/browser/compositor/offscreen_browser_compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698