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/viz/frame_sinks/gpu_compositor_frame_sink.h" | 5 #include "components/viz/frame_sinks/gpu_compositor_frame_sink.h" |
6 | 6 |
7 namespace viz { | 7 namespace viz { |
8 | 8 |
9 GpuCompositorFrameSink::GpuCompositorFrameSink( | 9 GpuCompositorFrameSink::GpuCompositorFrameSink( |
10 GpuCompositorFrameSinkDelegate* delegate, | 10 GpuCompositorFrameSinkDelegate* delegate, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 const cc::LocalSurfaceId& local_surface_id, | 48 const cc::LocalSurfaceId& local_surface_id, |
49 cc::CompositorFrame frame) { | 49 cc::CompositorFrame frame) { |
50 support_->SubmitCompositorFrame(local_surface_id, std::move(frame)); | 50 support_->SubmitCompositorFrame(local_surface_id, std::move(frame)); |
51 } | 51 } |
52 | 52 |
53 void GpuCompositorFrameSink::BeginFrameDidNotSwap( | 53 void GpuCompositorFrameSink::BeginFrameDidNotSwap( |
54 const cc::BeginFrameAck& begin_frame_ack) { | 54 const cc::BeginFrameAck& begin_frame_ack) { |
55 support_->BeginFrameDidNotSwap(begin_frame_ack); | 55 support_->BeginFrameDidNotSwap(begin_frame_ack); |
56 } | 56 } |
57 | 57 |
58 void GpuCompositorFrameSink::DidReceiveCompositorFrameAck() { | 58 void GpuCompositorFrameSink::DidReceiveCompositorFrameAck( |
| 59 const cc::ReturnedResourceArray& resources) { |
59 if (client_) | 60 if (client_) |
60 client_->DidReceiveCompositorFrameAck(); | 61 client_->DidReceiveCompositorFrameAck(resources); |
61 } | 62 } |
62 | 63 |
63 void GpuCompositorFrameSink::ClaimTemporaryReference( | 64 void GpuCompositorFrameSink::ClaimTemporaryReference( |
64 const cc::SurfaceId& surface_id) { | 65 const cc::SurfaceId& surface_id) { |
65 support_->ClaimTemporaryReference(surface_id); | 66 support_->ClaimTemporaryReference(surface_id); |
66 } | 67 } |
67 | 68 |
68 void GpuCompositorFrameSink::RequestCopyOfSurface( | 69 void GpuCompositorFrameSink::RequestCopyOfSurface( |
69 std::unique_ptr<cc::CopyOutputRequest> request) { | 70 std::unique_ptr<cc::CopyOutputRequest> request) { |
70 support_->RequestCopyOfSurface(std::move(request)); | 71 support_->RequestCopyOfSurface(std::move(request)); |
(...skipping 22 matching lines...) Expand all Loading... |
93 } | 94 } |
94 | 95 |
95 void GpuCompositorFrameSink::OnPrivateConnectionLost() { | 96 void GpuCompositorFrameSink::OnPrivateConnectionLost() { |
96 private_connection_lost_ = true; | 97 private_connection_lost_ = true; |
97 // Request destruction of |this| only if both connections are lost. | 98 // Request destruction of |this| only if both connections are lost. |
98 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), | 99 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), |
99 client_connection_lost_); | 100 client_connection_lost_); |
100 } | 101 } |
101 | 102 |
102 } // namespace viz | 103 } // namespace viz |
OLD | NEW |