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

Side by Side Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 2631263003: [headless] Fix screenshots with gpu enabled. (Closed)
Patch Set: add skia dep to build file. 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/compositor/gpu_process_transport_factory.h" 5 #include "content/browser/compositor/gpu_process_transport_factory.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 260 }
261 #elif defined(OS_ANDROID) 261 #elif defined(OS_ANDROID)
262 validator.reset( 262 validator.reset(
263 new display_compositor::CompositorOverlayCandidateValidatorAndroid()); 263 new display_compositor::CompositorOverlayCandidateValidatorAndroid());
264 #endif 264 #endif
265 265
266 return validator; 266 return validator;
267 } 267 }
268 268
269 static bool ShouldCreateGpuCompositorFrameSink(ui::Compositor* compositor) { 269 static bool ShouldCreateGpuCompositorFrameSink(ui::Compositor* compositor) {
270 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
271 if (command_line->HasSwitch(switches::kHeadless))
272 return false;
273
274 #if defined(OS_CHROMEOS) 270 #if defined(OS_CHROMEOS)
275 // Software fallback does not happen on Chrome OS. 271 // Software fallback does not happen on Chrome OS.
276 return true; 272 return true;
277 #endif 273 #endif
278 if (IsUsingMus()) 274 if (IsUsingMus())
279 return true; 275 return true;
280 276
281 #if defined(OS_WIN) 277 #if defined(OS_WIN)
282 if (::GetProp(compositor->widget(), kForceSoftwareCompositor) && 278 if (::GetProp(compositor->widget(), kForceSoftwareCompositor) &&
283 ::RemoveProp(compositor->widget(), kForceSoftwareCompositor)) 279 ::RemoveProp(compositor->widget(), kForceSoftwareCompositor))
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 shared_vulkan_context_provider_ = 903 shared_vulkan_context_provider_ =
908 cc::VulkanInProcessContextProvider::Create(); 904 cc::VulkanInProcessContextProvider::Create();
909 } 905 }
910 906
911 shared_vulkan_context_provider_initialized_ = true; 907 shared_vulkan_context_provider_initialized_ = true;
912 } 908 }
913 return shared_vulkan_context_provider_; 909 return shared_vulkan_context_provider_;
914 } 910 }
915 911
916 } // namespace content 912 } // namespace content
OLDNEW
« 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