| 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 display_output_surface = base::MakeUnique<GpuOutputSurfaceMac>( | 497 display_output_surface = base::MakeUnique<GpuOutputSurfaceMac>( |
| 498 compositor->widget(), context_provider, data->surface_handle, | 498 compositor->widget(), context_provider, data->surface_handle, |
| 499 vsync_callback, | 499 vsync_callback, |
| 500 CreateOverlayCandidateValidator(compositor->widget()), | 500 CreateOverlayCandidateValidator(compositor->widget()), |
| 501 GetGpuMemoryBufferManager()); | 501 GetGpuMemoryBufferManager()); |
| 502 #else | 502 #else |
| 503 display_output_surface = | 503 display_output_surface = |
| 504 base::MakeUnique<GpuSurfacelessBrowserCompositorOutputSurface>( | 504 base::MakeUnique<GpuSurfacelessBrowserCompositorOutputSurface>( |
| 505 context_provider, data->surface_handle, vsync_callback, | 505 context_provider, data->surface_handle, vsync_callback, |
| 506 CreateOverlayCandidateValidator(compositor->widget()), | 506 CreateOverlayCandidateValidator(compositor->widget()), |
| 507 GL_TEXTURE_2D, GL_RGB, ui::DisplaySnapshot::PrimaryFormat(), | 507 GL_TEXTURE_2D, GL_RGB, |
| 508 display::DisplaySnapshot::PrimaryFormat(), |
| 508 GetGpuMemoryBufferManager()); | 509 GetGpuMemoryBufferManager()); |
| 509 #endif | 510 #endif |
| 510 } else { | 511 } else { |
| 511 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> | 512 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> |
| 512 validator; | 513 validator; |
| 513 const bool use_mus = IsUsingMus(); | 514 const bool use_mus = IsUsingMus(); |
| 514 #if !defined(OS_MACOSX) | 515 #if !defined(OS_MACOSX) |
| 515 // Overlays are only supported on surfaceless output surfaces on Mac. | 516 // Overlays are only supported on surfaceless output surfaces on Mac. |
| 516 if (!use_mus) | 517 if (!use_mus) |
| 517 validator = CreateOverlayCandidateValidator(compositor->widget()); | 518 validator = CreateOverlayCandidateValidator(compositor->widget()); |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 shared_vulkan_context_provider_ = | 907 shared_vulkan_context_provider_ = |
| 907 cc::VulkanInProcessContextProvider::Create(); | 908 cc::VulkanInProcessContextProvider::Create(); |
| 908 } | 909 } |
| 909 | 910 |
| 910 shared_vulkan_context_provider_initialized_ = true; | 911 shared_vulkan_context_provider_initialized_ = true; |
| 911 } | 912 } |
| 912 return shared_vulkan_context_provider_; | 913 return shared_vulkan_context_provider_; |
| 913 } | 914 } |
| 914 | 915 |
| 915 } // namespace content | 916 } // namespace content |
| OLD | NEW |