| 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 create_gpu_output_surface, num_attempts + 1)); | 377 create_gpu_output_surface, num_attempts + 1)); |
| 378 return; | 378 return; |
| 379 } | 379 } |
| 380 } | 380 } |
| 381 | 381 |
| 382 std::unique_ptr<BrowserCompositorOutputSurface> surface; | 382 std::unique_ptr<BrowserCompositorOutputSurface> surface; |
| 383 #if defined(ENABLE_VULKAN) | 383 #if defined(ENABLE_VULKAN) |
| 384 std::unique_ptr<VulkanBrowserCompositorOutputSurface> vulkan_surface; | 384 std::unique_ptr<VulkanBrowserCompositorOutputSurface> vulkan_surface; |
| 385 if (vulkan_context_provider) { | 385 if (vulkan_context_provider) { |
| 386 vulkan_surface.reset(new VulkanBrowserCompositorOutputSurface( | 386 vulkan_surface.reset(new VulkanBrowserCompositorOutputSurface( |
| 387 vulkan_context_provider, compositor->vsync_manager())); | 387 vulkan_context_provider, compositor->vsync_manager(), |
| 388 compositor->task_runner().get())); |
| 388 if (!vulkan_surface->Initialize(compositor.get()->widget())) { | 389 if (!vulkan_surface->Initialize(compositor.get()->widget())) { |
| 389 vulkan_surface->Destroy(); | 390 vulkan_surface->Destroy(); |
| 390 vulkan_surface.reset(); | 391 vulkan_surface.reset(); |
| 391 } else { | 392 } else { |
| 392 surface = std::move(vulkan_surface); | 393 surface = std::move(vulkan_surface); |
| 393 } | 394 } |
| 394 } | 395 } |
| 395 #endif | 396 #endif |
| 396 | 397 |
| 397 if (!surface) { | 398 if (!surface) { |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 shared_vulkan_context_provider_ = | 725 shared_vulkan_context_provider_ = |
| 725 cc::VulkanInProcessContextProvider::Create(); | 726 cc::VulkanInProcessContextProvider::Create(); |
| 726 } | 727 } |
| 727 | 728 |
| 728 shared_vulkan_context_provider_initialized_ = true; | 729 shared_vulkan_context_provider_initialized_ = true; |
| 729 } | 730 } |
| 730 return shared_vulkan_context_provider_; | 731 return shared_vulkan_context_provider_; |
| 731 } | 732 } |
| 732 | 733 |
| 733 } // namespace content | 734 } // namespace content |
| OLD | NEW |