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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 CreateOverlayCandidateValidator(compositor->widget()), | 532 CreateOverlayCandidateValidator(compositor->widget()), |
533 GL_TEXTURE_2D, GL_RGB, | 533 GL_TEXTURE_2D, GL_RGB, |
534 display::DisplaySnapshot::PrimaryFormat(), | 534 display::DisplaySnapshot::PrimaryFormat(), |
535 GetGpuMemoryBufferManager()); | 535 GetGpuMemoryBufferManager()); |
536 gpu_vsync_control = gpu_output_surface.get(); | 536 gpu_vsync_control = gpu_output_surface.get(); |
537 display_output_surface = std::move(gpu_output_surface); | 537 display_output_surface = std::move(gpu_output_surface); |
538 #endif | 538 #endif |
539 } else { | 539 } else { |
540 std::unique_ptr<viz::CompositorOverlayCandidateValidator> validator; | 540 std::unique_ptr<viz::CompositorOverlayCandidateValidator> validator; |
541 #if defined(OS_WIN) | 541 #if defined(OS_WIN) |
542 if (capabilities.dc_layers) | 542 if (capabilities.dc_layers && capabilities.use_dc_overlays_for_video) |
543 validator = CreateOverlayCandidateValidator(compositor->widget()); | 543 validator = CreateOverlayCandidateValidator(compositor->widget()); |
544 #elif !defined(OS_MACOSX) | 544 #elif !defined(OS_MACOSX) |
545 // Overlays are only supported on surfaceless output surfaces on Mac. | 545 // Overlays are only supported on surfaceless output surfaces on Mac. |
546 validator = CreateOverlayCandidateValidator(compositor->widget()); | 546 validator = CreateOverlayCandidateValidator(compositor->widget()); |
547 #endif | 547 #endif |
548 auto gpu_output_surface = | 548 auto gpu_output_surface = |
549 base::MakeUnique<GpuBrowserCompositorOutputSurface>( | 549 base::MakeUnique<GpuBrowserCompositorOutputSurface>( |
550 context_provider, vsync_callback, std::move(validator)); | 550 context_provider, vsync_callback, std::move(validator)); |
551 gpu_vsync_control = gpu_output_surface.get(); | 551 gpu_vsync_control = gpu_output_surface.get(); |
552 display_output_surface = std::move(gpu_output_surface); | 552 display_output_surface = std::move(gpu_output_surface); |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 shared_vulkan_context_provider_ = | 955 shared_vulkan_context_provider_ = |
956 cc::VulkanInProcessContextProvider::Create(); | 956 cc::VulkanInProcessContextProvider::Create(); |
957 } | 957 } |
958 | 958 |
959 shared_vulkan_context_provider_initialized_ = true; | 959 shared_vulkan_context_provider_initialized_ = true; |
960 } | 960 } |
961 return shared_vulkan_context_provider_; | 961 return shared_vulkan_context_provider_; |
962 } | 962 } |
963 | 963 |
964 } // namespace content | 964 } // namespace content |
OLD | NEW |