| 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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 display_output_surface = std::move(vulkan_surface); | 461 display_output_surface = std::move(vulkan_surface); |
| 462 } | 462 } |
| 463 } | 463 } |
| 464 #endif | 464 #endif |
| 465 | 465 |
| 466 if (!display_output_surface) { | 466 if (!display_output_surface) { |
| 467 if (!create_gpu_output_surface) { | 467 if (!create_gpu_output_surface) { |
| 468 display_output_surface = | 468 display_output_surface = |
| 469 base::MakeUnique<SoftwareBrowserCompositorOutputSurface>( | 469 base::MakeUnique<SoftwareBrowserCompositorOutputSurface>( |
| 470 CreateSoftwareOutputDevice(compositor.get()), | 470 CreateSoftwareOutputDevice(compositor.get()), |
| 471 compositor->vsync_manager(), begin_frame_source.get()); | 471 compositor->vsync_manager(), begin_frame_source.get(), |
| 472 compositor->task_runner()); |
| 472 } else { | 473 } else { |
| 473 DCHECK(context_provider); | 474 DCHECK(context_provider); |
| 474 const auto& capabilities = context_provider->ContextCapabilities(); | 475 const auto& capabilities = context_provider->ContextCapabilities(); |
| 475 if (data->surface_handle == gpu::kNullSurfaceHandle) { | 476 if (data->surface_handle == gpu::kNullSurfaceHandle) { |
| 476 display_output_surface = | 477 display_output_surface = |
| 477 base::MakeUnique<OffscreenBrowserCompositorOutputSurface>( | 478 base::MakeUnique<OffscreenBrowserCompositorOutputSurface>( |
| 478 context_provider, compositor->vsync_manager(), | 479 context_provider, compositor->vsync_manager(), |
| 479 begin_frame_source.get(), | 480 begin_frame_source.get(), |
| 480 std::unique_ptr< | 481 std::unique_ptr< |
| 481 display_compositor::CompositorOverlayCandidateValidator>()); | 482 display_compositor::CompositorOverlayCandidateValidator>()); |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 shared_vulkan_context_provider_ = | 872 shared_vulkan_context_provider_ = |
| 872 cc::VulkanInProcessContextProvider::Create(); | 873 cc::VulkanInProcessContextProvider::Create(); |
| 873 } | 874 } |
| 874 | 875 |
| 875 shared_vulkan_context_provider_initialized_ = true; | 876 shared_vulkan_context_provider_initialized_ = true; |
| 876 } | 877 } |
| 877 return shared_vulkan_context_provider_; | 878 return shared_vulkan_context_provider_; |
| 878 } | 879 } |
| 879 | 880 |
| 880 } // namespace content | 881 } // namespace content |
| OLD | NEW |