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

Side by Side Diff: services/ui/ws/server_window_compositor_frame_sink_manager.cc

Issue 2715663007: Implement temporary reference assignment with DisplayCompositor. (Closed)
Patch Set: Rebase. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "services/ui/ws/server_window_compositor_frame_sink_manager.h" 5 #include "services/ui/ws/server_window_compositor_frame_sink_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "cc/ipc/display_compositor.mojom.h" 9 #include "cc/ipc/display_compositor.mojom.h"
10 #include "mojo/public/cpp/bindings/strong_binding.h" 10 #include "mojo/public/cpp/bindings/strong_binding.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 if (!pending_compositor_frame_sink_request_.is_pending()) { 48 if (!pending_compositor_frame_sink_request_.is_pending()) {
49 pending_compositor_frame_sink_request_ = 49 pending_compositor_frame_sink_request_ =
50 mojo::MakeRequest(&compositor_frame_sink_); 50 mojo::MakeRequest(&compositor_frame_sink_);
51 } 51 }
52 52
53 window_->delegate()->GetDisplayCompositor()->CreateCompositorFrameSink( 53 window_->delegate()->GetDisplayCompositor()->CreateCompositorFrameSink(
54 window_->frame_sink_id(), std::move(request), 54 window_->frame_sink_id(), std::move(request),
55 std::move(pending_compositor_frame_sink_request_), std::move(client)); 55 std::move(pending_compositor_frame_sink_request_), std::move(client));
56 } 56 }
57 57
58 void ServerWindowCompositorFrameSinkManager::ClaimTemporaryReference(
59 const cc::SurfaceId& surface_id) {
60 if (!compositor_frame_sink_.is_bound()) {
61 pending_compositor_frame_sink_request_ =
62 mojo::MakeRequest(&compositor_frame_sink_);
63 }
64 compositor_frame_sink_->ClaimTemporaryReference(surface_id);
65 }
66
58 } // namespace ws 67 } // namespace ws
59 } // namespace ui 68 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/server_window_compositor_frame_sink_manager.h ('k') | services/ui/ws/window_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698