| 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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 std::move(display_output_surface), std::move(scheduler), | 546 std::move(display_output_surface), std::move(scheduler), |
| 547 base::MakeUnique<cc::TextureMailboxDeleter>( | 547 base::MakeUnique<cc::TextureMailboxDeleter>( |
| 548 compositor->task_runner().get())); | 548 compositor->task_runner().get())); |
| 549 | 549 |
| 550 // The |delegated_output_surface| is given back to the compositor, it | 550 // The |delegated_output_surface| is given back to the compositor, it |
| 551 // delegates to the Display as its root surface. Importantly, it shares the | 551 // delegates to the Display as its root surface. Importantly, it shares the |
| 552 // same ContextProvider as the Display's output surface. | 552 // same ContextProvider as the Display's output surface. |
| 553 auto compositor_frame_sink = | 553 auto compositor_frame_sink = |
| 554 vulkan_context_provider | 554 vulkan_context_provider |
| 555 ? base::MakeUnique<cc::DirectCompositorFrameSink>( | 555 ? base::MakeUnique<cc::DirectCompositorFrameSink>( |
| 556 surface_manager_.get(), compositor->surface_id_allocator(), | 556 compositor->frame_sink_id(), surface_manager_.get(), |
| 557 data->display.get(), | 557 data->display.get(), |
| 558 static_cast<scoped_refptr<cc::VulkanContextProvider>>( | 558 static_cast<scoped_refptr<cc::VulkanContextProvider>>( |
| 559 vulkan_context_provider)) | 559 vulkan_context_provider)) |
| 560 : base::MakeUnique<cc::DirectCompositorFrameSink>( | 560 : base::MakeUnique<cc::DirectCompositorFrameSink>( |
| 561 surface_manager_.get(), compositor->surface_id_allocator(), | 561 compositor->frame_sink_id(), surface_manager_.get(), |
| 562 data->display.get(), context_provider, | 562 data->display.get(), context_provider, |
| 563 shared_worker_context_provider_); | 563 shared_worker_context_provider_); |
| 564 data->display->Resize(compositor->size()); | 564 data->display->Resize(compositor->size()); |
| 565 data->display->SetOutputIsSecure(data->output_is_secure); | 565 data->display->SetOutputIsSecure(data->output_is_secure); |
| 566 compositor->SetCompositorFrameSink(std::move(compositor_frame_sink)); | 566 compositor->SetCompositorFrameSink(std::move(compositor_frame_sink)); |
| 567 } | 567 } |
| 568 | 568 |
| 569 std::unique_ptr<ui::Reflector> GpuProcessTransportFactory::CreateReflector( | 569 std::unique_ptr<ui::Reflector> GpuProcessTransportFactory::CreateReflector( |
| 570 ui::Compositor* source_compositor, | 570 ui::Compositor* source_compositor, |
| 571 ui::Layer* target_layer) { | 571 ui::Layer* target_layer) { |
| (...skipping 299 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 |