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

Unified Diff: ui/aura/mus/window_port_mus.cc

Issue 2464123003: Enabling Aura-Mus clients to submit frames to Mus. (Closed)
Patch Set: Rebase, addressing feedback, removing some unneded imports/deps. Created 4 years, 1 month 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 | « ui/aura/mus/window_port_mus.h ('k') | ui/aura/mus/window_tree_host_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_port_mus.cc
diff --git a/ui/aura/mus/window_port_mus.cc b/ui/aura/mus/window_port_mus.cc
index ef8c087199fd8d8a59a1a60b3af642b7bd72fd56..d3862ac13a7205320930ddb3ae7b5dd46de84826 100644
--- a/ui/aura/mus/window_port_mus.cc
+++ b/ui/aura/mus/window_port_mus.cc
@@ -55,6 +55,32 @@ void WindowPortMus::SetPredefinedCursor(ui::mojom::Cursor cursor_id) {
predefined_cursor_ = cursor_id;
}
+std::unique_ptr<WindowCompositorFrameSink>
+WindowPortMus::RequestCompositorFrameSink(
+ ui::mojom::CompositorFrameSinkType type,
+ scoped_refptr<cc::ContextProvider> context_provider,
+ gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) {
+ std::unique_ptr<WindowCompositorFrameSinkBinding>
+ compositor_frame_sink_binding;
+ std::unique_ptr<WindowCompositorFrameSink> compositor_frame_sink =
+ WindowCompositorFrameSink::Create(std::move(context_provider),
+ gpu_memory_buffer_manager,
+ &compositor_frame_sink_binding);
+ AttachCompositorFrameSink(type, std::move(compositor_frame_sink_binding));
+ return compositor_frame_sink;
+}
+
+void WindowPortMus::AttachCompositorFrameSink(
+ ui::mojom::CompositorFrameSinkType type,
+ std::unique_ptr<WindowCompositorFrameSinkBinding>
+ compositor_frame_sink_binding) {
+ window_tree_client_->AttachCompositorFrameSink(
+ server_id(), type,
+ std::move(compositor_frame_sink_binding->compositor_frame_sink_request_),
+ mojo::MakeProxy(std::move(
+ compositor_frame_sink_binding->compositor_frame_sink_client_)));
+}
+
WindowPortMus::ServerChangeIdType WindowPortMus::ScheduleChange(
const ServerChangeType type,
const ServerChangeData& data) {
« no previous file with comments | « ui/aura/mus/window_port_mus.h ('k') | ui/aura/mus/window_tree_host_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698