| Index: cc/surfaces/surface.cc
|
| diff --git a/cc/surfaces/surface.cc b/cc/surfaces/surface.cc
|
| index 63dd62cc1b005c286c2a5c369cbc91aad51a6c77..393b768d8e77f1feeffd5fa9642b18d69627faee 100644
|
| --- a/cc/surfaces/surface.cc
|
| +++ b/cc/surfaces/surface.cc
|
| @@ -164,6 +164,14 @@ void Surface::ActivatePendingFrame() {
|
| // compositor.
|
| void Surface::ActivateFrame(CompositorFrame frame) {
|
| DCHECK(factory_);
|
| +
|
| + // Save root pass copy requests.
|
| + std::vector<std::unique_ptr<CopyOutputRequest>> old_copy_requests;
|
| + if (active_frame_ && !active_frame_->render_pass_list.empty()) {
|
| + std::swap(old_copy_requests,
|
| + active_frame_->render_pass_list.back()->copy_requests);
|
| + }
|
| +
|
| ClearCopyRequests();
|
|
|
| TakeLatencyInfo(&frame.metadata.latency_info);
|
| @@ -171,6 +179,9 @@ void Surface::ActivateFrame(CompositorFrame frame) {
|
| base::Optional<CompositorFrame> previous_frame = std::move(active_frame_);
|
| active_frame_ = std::move(frame);
|
|
|
| + for (auto& copy_request : old_copy_requests)
|
| + RequestCopyOfOutput(std::move(copy_request));
|
| +
|
| // Empty frames shouldn't be drawn and shouldn't contribute damage, so don't
|
| // increment frame index for them.
|
| if (!active_frame_->render_pass_list.empty())
|
|
|