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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 if (command_line->HasSwitch(switches::kEnableHardwareOverlays)) { | 229 if (command_line->HasSwitch(switches::kEnableHardwareOverlays)) { |
230 std::string enable_overlay_flag = | 230 std::string enable_overlay_flag = |
231 command_line->GetSwitchValueASCII(switches::kEnableHardwareOverlays); | 231 command_line->GetSwitchValueASCII(switches::kEnableHardwareOverlays); |
232 std::unique_ptr<ui::OverlayCandidatesOzone> overlay_candidates = | 232 std::unique_ptr<ui::OverlayCandidatesOzone> overlay_candidates = |
233 ui::OzonePlatform::GetInstance() | 233 ui::OzonePlatform::GetInstance() |
234 ->GetOverlayManager() | 234 ->GetOverlayManager() |
235 ->CreateOverlayCandidates(widget); | 235 ->CreateOverlayCandidates(widget); |
236 validator.reset( | 236 validator.reset( |
237 new display_compositor::CompositorOverlayCandidateValidatorOzone( | 237 new display_compositor::CompositorOverlayCandidateValidatorOzone( |
238 std::move(overlay_candidates), | 238 std::move(overlay_candidates), |
239 enable_overlay_flag == "single-fullscreen")); | 239 enable_overlay_flag == "single-fullscreen", |
| 240 enable_overlay_flag == "cast-underlay")); |
240 } | 241 } |
241 #elif defined(OS_MACOSX) | 242 #elif defined(OS_MACOSX) |
242 // Overlays are only supported through the remote layer API. | 243 // Overlays are only supported through the remote layer API. |
243 if (ui::RemoteLayerAPISupported()) { | 244 if (ui::RemoteLayerAPISupported()) { |
244 static bool overlays_disabled_at_command_line = | 245 static bool overlays_disabled_at_command_line = |
245 IsCALayersDisabledFromCommandLine(); | 246 IsCALayersDisabledFromCommandLine(); |
246 const bool ca_layers_disabled = | 247 const bool ca_layers_disabled = |
247 overlays_disabled_at_command_line || | 248 overlays_disabled_at_command_line || |
248 GpuDataManagerImpl::GetInstance()->IsDriverBugWorkaroundActive( | 249 GpuDataManagerImpl::GetInstance()->IsDriverBugWorkaroundActive( |
249 gpu::DISABLE_OVERLAY_CA_LAYERS); | 250 gpu::DISABLE_OVERLAY_CA_LAYERS); |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 shared_vulkan_context_provider_ = | 881 shared_vulkan_context_provider_ = |
881 cc::VulkanInProcessContextProvider::Create(); | 882 cc::VulkanInProcessContextProvider::Create(); |
882 } | 883 } |
883 | 884 |
884 shared_vulkan_context_provider_initialized_ = true; | 885 shared_vulkan_context_provider_initialized_ = true; |
885 } | 886 } |
886 return shared_vulkan_context_provider_; | 887 return shared_vulkan_context_provider_; |
887 } | 888 } |
888 | 889 |
889 } // namespace content | 890 } // namespace content |
OLD | NEW |