OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/viz/frame_sinks/gpu_root_compositor_frame_sink.h" | 5 #include "components/viz/frame_sinks/gpu_root_compositor_frame_sink.h" |
6 | 6 |
7 #include "cc/surfaces/compositor_frame_sink_support.h" | 7 #include "cc/surfaces/compositor_frame_sink_support.h" |
8 #include "cc/surfaces/display.h" | 8 #include "cc/surfaces/display.h" |
9 | 9 |
10 namespace viz { | 10 namespace viz { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // TODO(staraz): Implement this. Client should hear about context/output | 108 // TODO(staraz): Implement this. Client should hear about context/output |
109 // surface lost. | 109 // surface lost. |
110 } | 110 } |
111 | 111 |
112 void GpuRootCompositorFrameSink::DisplayWillDrawAndSwap( | 112 void GpuRootCompositorFrameSink::DisplayWillDrawAndSwap( |
113 bool will_draw_and_swap, | 113 bool will_draw_and_swap, |
114 const cc::RenderPassList& render_pass) {} | 114 const cc::RenderPassList& render_pass) {} |
115 | 115 |
116 void GpuRootCompositorFrameSink::DisplayDidDrawAndSwap() {} | 116 void GpuRootCompositorFrameSink::DisplayDidDrawAndSwap() {} |
117 | 117 |
118 void GpuRootCompositorFrameSink::DidReceiveCompositorFrameAck() { | 118 void GpuRootCompositorFrameSink::DidReceiveCompositorFrameAck( |
| 119 const cc::ReturnedResourceArray& resources) { |
119 if (client_) | 120 if (client_) |
120 client_->DidReceiveCompositorFrameAck(); | 121 client_->DidReceiveCompositorFrameAck(resources); |
121 } | 122 } |
122 | 123 |
123 void GpuRootCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) { | 124 void GpuRootCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) { |
124 if (client_) | 125 if (client_) |
125 client_->OnBeginFrame(args); | 126 client_->OnBeginFrame(args); |
126 } | 127 } |
127 | 128 |
128 void GpuRootCompositorFrameSink::ReclaimResources( | 129 void GpuRootCompositorFrameSink::ReclaimResources( |
129 const cc::ReturnedResourceArray& resources) { | 130 const cc::ReturnedResourceArray& resources) { |
130 if (client_) | 131 if (client_) |
(...skipping 12 matching lines...) Expand all Loading... |
143 } | 144 } |
144 | 145 |
145 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { | 146 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { |
146 private_connection_lost_ = true; | 147 private_connection_lost_ = true; |
147 // Request destruction of |this| only if both connections are lost. | 148 // Request destruction of |this| only if both connections are lost. |
148 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), | 149 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), |
149 client_connection_lost_); | 150 client_connection_lost_); |
150 } | 151 } |
151 | 152 |
152 } // namespace viz | 153 } // namespace viz |
OLD | NEW |