Index: cc/output/gl_renderer.cc |
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc |
index 096bf107b25b283fb5dfb1cdf72eea66113c8b04..2f98c94a084fbae0974b32e7377904ca6915e6bd 100644 |
--- a/cc/output/gl_renderer.cc |
+++ b/cc/output/gl_renderer.cc |
@@ -2717,10 +2717,10 @@ void GLRenderer::SwapBuffers(const CompositorFrameMetadata& metadata) { |
gfx::Size surface_size = output_surface_->SurfaceSize(); |
- CompositorFrame compositor_frame; |
- compositor_frame.metadata = metadata; |
- compositor_frame.gl_frame_data = base::WrapUnique(new GLFrameData); |
- compositor_frame.gl_frame_data->size = surface_size; |
+ std::unique_ptr<CompositorFrame> compositor_frame(CompositorFrame::Create()); |
+ compositor_frame->metadata = metadata; |
+ compositor_frame->gl_frame_data = base::WrapUnique(new GLFrameData); |
+ compositor_frame->gl_frame_data->size = surface_size; |
if (capabilities_.using_partial_swap) { |
// If supported, we can save significant bandwidth by only swapping the |
// damaged/scissored region (clamped to the viewport). |
@@ -2728,7 +2728,7 @@ void GLRenderer::SwapBuffers(const CompositorFrameMetadata& metadata) { |
int flipped_y_pos_of_rect_bottom = surface_size.height() - |
swap_buffer_rect_.y() - |
swap_buffer_rect_.height(); |
- compositor_frame.gl_frame_data->sub_buffer_rect = |
+ compositor_frame->gl_frame_data->sub_buffer_rect = |
gfx::Rect(swap_buffer_rect_.x(), |
FlippedRootFramebuffer() ? flipped_y_pos_of_rect_bottom |
: swap_buffer_rect_.y(), |
@@ -2739,7 +2739,7 @@ void GLRenderer::SwapBuffers(const CompositorFrameMetadata& metadata) { |
if (!swap_buffer_rect_.IsEmpty() || !capabilities_.allow_empty_swap) { |
swap_buffer_rect_ = gfx::Rect(surface_size); |
} |
- compositor_frame.gl_frame_data->sub_buffer_rect = swap_buffer_rect_; |
+ compositor_frame->gl_frame_data->sub_buffer_rect = swap_buffer_rect_; |
} |
swapping_overlay_resources_.push_back(std::move(pending_overlay_resources_)); |
@@ -2752,7 +2752,7 @@ void GLRenderer::SwapBuffers(const CompositorFrameMetadata& metadata) { |
swapping_overlay_resources_.pop_front(); |
} |
- output_surface_->SwapBuffers(&compositor_frame); |
+ output_surface_->SwapBuffers(std::move(compositor_frame)); |
swap_buffer_rect_ = gfx::Rect(); |
} |