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 "components/display_compositor/gpu_compositor_frame_sink.h" | 5 #include "components/display_compositor/gpu_compositor_frame_sink.h" |
6 | 6 |
7 #include "cc/surfaces/surface_reference.h" | 7 #include "cc/surfaces/surface_reference.h" |
8 | 8 |
9 namespace display_compositor { | 9 namespace display_compositor { |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 void GpuCompositorFrameSink::Satisfy(const cc::SurfaceSequence& sequence) { | 60 void GpuCompositorFrameSink::Satisfy(const cc::SurfaceSequence& sequence) { |
61 support_->Satisfy(sequence); | 61 support_->Satisfy(sequence); |
62 } | 62 } |
63 | 63 |
64 void GpuCompositorFrameSink::DidReceiveCompositorFrameAck() { | 64 void GpuCompositorFrameSink::DidReceiveCompositorFrameAck() { |
65 if (client_) | 65 if (client_) |
66 client_->DidReceiveCompositorFrameAck(); | 66 client_->DidReceiveCompositorFrameAck(); |
67 } | 67 } |
68 | 68 |
69 void GpuCompositorFrameSink::AddChildFrameSink( | |
70 const cc::FrameSinkId& child_frame_sink_id) { | |
71 support_->AddChildFrameSink(child_frame_sink_id); | |
72 } | |
73 | |
74 void GpuCompositorFrameSink::RemoveChildFrameSink( | |
75 const cc::FrameSinkId& child_frame_sink_id) { | |
76 support_->RemoveChildFrameSink(child_frame_sink_id); | |
77 } | |
78 | |
79 void GpuCompositorFrameSink::RequestCopyOfSurface( | 69 void GpuCompositorFrameSink::RequestCopyOfSurface( |
80 std::unique_ptr<cc::CopyOutputRequest> request) { | 70 std::unique_ptr<cc::CopyOutputRequest> request) { |
81 support_->RequestCopyOfSurface(std::move(request)); | 71 support_->RequestCopyOfSurface(std::move(request)); |
82 } | 72 } |
83 | 73 |
84 void GpuCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) { | 74 void GpuCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) { |
85 if (client_) | 75 if (client_) |
86 client_->OnBeginFrame(args); | 76 client_->OnBeginFrame(args); |
87 } | 77 } |
88 | 78 |
(...skipping 18 matching lines...) Expand all Loading... |
107 } | 97 } |
108 | 98 |
109 void GpuCompositorFrameSink::OnPrivateConnectionLost() { | 99 void GpuCompositorFrameSink::OnPrivateConnectionLost() { |
110 private_connection_lost_ = true; | 100 private_connection_lost_ = true; |
111 // Request destruction of |this| only if both connections are lost. | 101 // Request destruction of |this| only if both connections are lost. |
112 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), | 102 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), |
113 client_connection_lost_); | 103 client_connection_lost_); |
114 } | 104 } |
115 | 105 |
116 } // namespace display_compositor | 106 } // namespace display_compositor |
OLD | NEW |