Index: content/browser/frame_host/render_widget_host_view_child_frame.cc |
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc |
index 91d0b2ae5c4dda616a28e30621f921a5e67221dd..88ea407cb7071d6c6b3539d591e0caf8d6f47146 100644 |
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc |
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc |
@@ -367,20 +367,20 @@ void RenderWidgetHostViewChildFrame::SurfaceDrawn(uint32_t output_surface_id, |
void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame( |
uint32_t output_surface_id, |
- std::unique_ptr<cc::CompositorFrame> frame) { |
+ cc::CompositorFrame frame) { |
TRACE_EVENT0("content", |
"RenderWidgetHostViewChildFrame::OnSwapCompositorFrame"); |
- last_scroll_offset_ = frame->metadata.root_scroll_offset; |
+ last_scroll_offset_ = frame.metadata.root_scroll_offset; |
if (!frame_connector_) |
return; |
cc::RenderPass* root_pass = |
- frame->delegated_frame_data->render_pass_list.back().get(); |
+ frame.delegated_frame_data->render_pass_list.back().get(); |
gfx::Size frame_size = root_pass->output_rect.size(); |
- float scale_factor = frame->metadata.device_scale_factor; |
+ float scale_factor = frame.metadata.device_scale_factor; |
// Check whether we need to recreate the cc::Surface, which means the child |
// frame renderer has changed its output surface, or size, or scale factor. |
@@ -422,7 +422,9 @@ void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame( |
ack_pending_count_++; |
// If this value grows very large, something is going wrong. |
DCHECK_LT(ack_pending_count_, 1000U); |
- surface_factory_->SubmitCompositorFrame(surface_id_, std::move(frame), |
+ std::unique_ptr<cc::CompositorFrame> frame_copy(new cc::CompositorFrame); |
+ *frame_copy = std::move(frame); |
+ surface_factory_->SubmitCompositorFrame(surface_id_, std::move(frame_copy), |
ack_callback); |
ProcessFrameSwappedCallbacks(); |