| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |