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

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

Issue 2738923002: Add DisplayClientCompositorFrameSink (Closed)
Patch Set: Updated BeginFrame requests logic and other fixes from fsamuel@ 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
« services/ui/ws/frame_generator.cc ('K') | « services/ui/ws/frame_generator.cc ('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..8e04512f1afafd68288533ea4c58410b4aa86aa0 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,29 @@ 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);
+ cc::mojom::MojoCompositorFrameSinkAssociatedRequest sink_request =
+ mojo::MakeRequest(&compositor_frame_sink);
+ cc::mojom::DisplayPrivateAssociatedRequest display_request =
+ mojo::MakeRequest(&display_private);
Fady Samuel 2017/03/10 18:37:57 Let's cut down the number of local variables here
+ root_window_->CreateRootCompositorFrameSink(
+ widget_, std::move(sink_request), std::move(compositor_frame_sink_client),
Fady Samuel 2017/03/10 18:37:57 mojo::MakeRequest(&compositor_frame_sink)
Alex Z. 2017/03/10 19:08:39 Done.
+ std::move(display_request));
Fady Samuel 2017/03/10 18:37:57 MakeRequest(&display_private)
Alex Z. 2017/03/10 19:08:39 Done.
+
+ 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));
Fady Samuel 2017/03/10 18:37:57 mojo::MakeRequest(&compositor_frame_sink_client)?
Alex Z. 2017/03/10 19:08:39 Chrome mash window shows no content on startup onc
+ frame_generator_ = base::MakeUnique<FrameGenerator>(
+ this, root_window_, widget_,
+ std::move(display_client_compositor_frame_sink));
frame_generator_->SetDeviceScaleFactor(init_device_scale_factor_);
}
« services/ui/ws/frame_generator.cc ('K') | « services/ui/ws/frame_generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698