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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 base::MakeUnique<cc::DelayBasedTimeSource>( | 446 base::MakeUnique<cc::DelayBasedTimeSource>( |
447 compositor->task_runner().get()))); | 447 compositor->task_runner().get()))); |
448 } | 448 } |
449 | 449 |
450 std::unique_ptr<BrowserCompositorOutputSurface> display_output_surface; | 450 std::unique_ptr<BrowserCompositorOutputSurface> display_output_surface; |
451 #if defined(ENABLE_VULKAN) | 451 #if defined(ENABLE_VULKAN) |
452 std::unique_ptr<VulkanBrowserCompositorOutputSurface> vulkan_surface; | 452 std::unique_ptr<VulkanBrowserCompositorOutputSurface> vulkan_surface; |
453 if (vulkan_context_provider) { | 453 if (vulkan_context_provider) { |
454 vulkan_surface.reset(new VulkanBrowserCompositorOutputSurface( | 454 vulkan_surface.reset(new VulkanBrowserCompositorOutputSurface( |
455 vulkan_context_provider, compositor->vsync_manager(), | 455 vulkan_context_provider, compositor->vsync_manager(), |
456 compositor->task_runner().get())); | 456 begin_frame_source.get())); |
457 if (!vulkan_surface->Initialize(compositor.get()->widget())) { | 457 if (!vulkan_surface->Initialize(compositor.get()->widget())) { |
458 vulkan_surface->Destroy(); | 458 vulkan_surface->Destroy(); |
459 vulkan_surface.reset(); | 459 vulkan_surface.reset(); |
460 } else { | 460 } else { |
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) { |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 shared_vulkan_context_provider_ = | 871 shared_vulkan_context_provider_ = |
872 cc::VulkanInProcessContextProvider::Create(); | 872 cc::VulkanInProcessContextProvider::Create(); |
873 } | 873 } |
874 | 874 |
875 shared_vulkan_context_provider_initialized_ = true; | 875 shared_vulkan_context_provider_initialized_ = true; |
876 } | 876 } |
877 return shared_vulkan_context_provider_; | 877 return shared_vulkan_context_provider_; |
878 } | 878 } |
879 | 879 |
880 } // namespace content | 880 } // namespace content |
OLD | NEW |