| OLD | NEW |
| 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 Loading... |
| 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 |
| 270 #if defined(OS_CHROMEOS) | 274 #if defined(OS_CHROMEOS) |
| 271 // Software fallback does not happen on Chrome OS. | 275 // Software fallback does not happen on Chrome OS. |
| 272 return true; | 276 return true; |
| 273 #endif | 277 #endif |
| 274 if (IsUsingMus()) | 278 if (IsUsingMus()) |
| 275 return true; | 279 return true; |
| 276 | 280 |
| 277 #if defined(OS_WIN) | 281 #if defined(OS_WIN) |
| 278 if (::GetProp(compositor->widget(), kForceSoftwareCompositor) && | 282 if (::GetProp(compositor->widget(), kForceSoftwareCompositor) && |
| 279 ::RemoveProp(compositor->widget(), kForceSoftwareCompositor)) | 283 ::RemoveProp(compositor->widget(), kForceSoftwareCompositor)) |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 shared_vulkan_context_provider_ = | 907 shared_vulkan_context_provider_ = |
| 904 cc::VulkanInProcessContextProvider::Create(); | 908 cc::VulkanInProcessContextProvider::Create(); |
| 905 } | 909 } |
| 906 | 910 |
| 907 shared_vulkan_context_provider_initialized_ = true; | 911 shared_vulkan_context_provider_initialized_ = true; |
| 908 } | 912 } |
| 909 return shared_vulkan_context_provider_; | 913 return shared_vulkan_context_provider_; |
| 910 } | 914 } |
| 911 | 915 |
| 912 } // namespace content | 916 } // namespace content |
| OLD | NEW |