Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Unified Diff: services/ui/ws/platform_display_default.cc

Issue 2738923002: Add DisplayClientCompositorFrameSink (Closed)
Patch Set: addressed nits Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/ws/platform_display_default.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/platform_display_default.cc
diff --git a/services/ui/ws/platform_display_default.cc b/services/ui/ws/platform_display_default.cc
index 6d32827f0b7947b72cf10d2ca98cb7f491b6a6b1..fcf12c853046d4579c6ae26f006745c4f0c2dd8e 100644
--- a/services/ui/ws/platform_display_default.cc
+++ b/services/ui/ws/platform_display_default.cc
@@ -7,6 +7,7 @@
#include "base/memory/ptr_util.h"
#include "gpu/ipc/client/gpu_channel_host.h"
#include "services/ui/display/screen_manager.h"
+#include "services/ui/ws/display_client_compositor_frame_sink.h"
#include "services/ui/ws/platform_display_init_params.h"
#include "services/ui/ws/server_window.h"
#include "ui/base/cursor/image_cursors.h"
@@ -248,8 +249,26 @@ void PlatformDisplayDefault::OnAcceleratedWidgetAvailable(
DCHECK_EQ(gfx::kNullAcceleratedWidget, widget_);
widget_ = widget;
delegate_->OnAcceleratedWidgetAvailable();
- frame_generator_ =
- base::MakeUnique<FrameGenerator>(this, root_window_, widget_);
+
+ cc::mojom::MojoCompositorFrameSinkAssociatedPtr compositor_frame_sink;
+ cc::mojom::DisplayPrivateAssociatedPtr display_private;
+ cc::mojom::MojoCompositorFrameSinkClientPtr compositor_frame_sink_client;
+ cc::mojom::MojoCompositorFrameSinkClientRequest
+ compositor_frame_sink_client_request =
+ mojo::MakeRequest(&compositor_frame_sink_client);
+
+ root_window_->CreateRootCompositorFrameSink(
+ widget_, mojo::MakeRequest(&compositor_frame_sink),
+ std::move(compositor_frame_sink_client),
+ mojo::MakeRequest(&display_private));
+
+ auto display_client_compositor_frame_sink =
+ base::MakeUnique<DisplayClientCompositorFrameSink>(
+ root_window_->frame_sink_id(), std::move(compositor_frame_sink),
+ std::move(display_private),
+ std::move(compositor_frame_sink_client_request));
+ frame_generator_ = base::MakeUnique<FrameGenerator>(
+ this, root_window_, std::move(display_client_compositor_frame_sink));
frame_generator_->SetDeviceScaleFactor(init_device_scale_factor_);
}
« no previous file with comments | « services/ui/ws/platform_display_default.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698