| Index: content/browser/compositor/gpu_process_transport_factory.cc
|
| diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
|
| index 54b71195e9a8b7ffdcadc17a393d38cc781ea407..ac22112c31cf8d69db46b8edd7707800bf83e7f0 100644
|
| --- a/content/browser/compositor/gpu_process_transport_factory.cc
|
| +++ b/content/browser/compositor/gpu_process_transport_factory.cc
|
| @@ -51,6 +51,7 @@
|
| #include "gpu/vulkan/features.h"
|
| #include "services/service_manager/runner/common/client_util.h"
|
| #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h"
|
| +#include "services/ui/surfaces/display_compositor.h"
|
| #include "third_party/khronos/GLES2/gl2.h"
|
| #include "ui/compositor/compositor.h"
|
| #include "ui/compositor/compositor_constants.h"
|
| @@ -195,7 +196,8 @@ GpuProcessTransportFactory::GpuProcessTransportFactory()
|
| callback_factory_(this) {
|
| cc::SetClientNameForMetrics("Browser");
|
|
|
| - surface_manager_ = base::WrapUnique(new cc::SurfaceManager);
|
| + display_compositor_ = base::MakeUnique<ui::DisplayCompositor>(
|
| + nullptr, MakeRequest(&display_compositor_ptr_), nullptr);
|
|
|
| task_graph_runner_->Start("CompositorTileWorker1",
|
| base::SimpleThread::Options());
|
| @@ -597,12 +599,12 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
|
| auto compositor_frame_sink =
|
| vulkan_context_provider
|
| ? base::MakeUnique<cc::DirectCompositorFrameSink>(
|
| - compositor->frame_sink_id(), surface_manager_.get(),
|
| + compositor->frame_sink_id(), GetSurfaceManager(),
|
| data->display.get(),
|
| static_cast<scoped_refptr<cc::VulkanContextProvider>>(
|
| vulkan_context_provider))
|
| : base::MakeUnique<cc::DirectCompositorFrameSink>(
|
| - compositor->frame_sink_id(), surface_manager_.get(),
|
| + compositor->frame_sink_id(), GetSurfaceManager(),
|
| data->display.get(), context_provider,
|
| shared_worker_context_provider_, GetGpuMemoryBufferManager(),
|
| HostSharedBitmapManager::current());
|
| @@ -792,7 +794,12 @@ void GpuProcessTransportFactory::RemoveObserver(
|
| }
|
|
|
| cc::SurfaceManager* GpuProcessTransportFactory::GetSurfaceManager() {
|
| - return surface_manager_.get();
|
| + return display_compositor_->surface_manager();
|
| +}
|
| +
|
| +cc::mojom::DisplayCompositor*
|
| +GpuProcessTransportFactory::GetDisplayCompositor() {
|
| + return display_compositor_ptr_.get();
|
| }
|
|
|
| display_compositor::GLHelper* GpuProcessTransportFactory::GetGLHelper() {
|
|
|