Chromium Code Reviews| Index: cc/output/gl_renderer.cc |
| diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc |
| index 1677de1ccc083300f6b81dc0bac0e10da0dd545b..f6e1114aea362340d77d8cb3617743958a848a92 100644 |
| --- a/cc/output/gl_renderer.cc |
| +++ b/cc/output/gl_renderer.cc |
| @@ -2607,23 +2607,18 @@ void GLRenderer::SwapBuffers(const CompositorFrameMetadata& metadata) { |
| compositor_frame.metadata = metadata; |
| compositor_frame.gl_frame_data = make_scoped_ptr(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). |
| - swap_buffer_rect_.Intersect(gfx::Rect(surface_size)); |
| - 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 = |
| - gfx::Rect(swap_buffer_rect_.x(), |
| - FlippedRootFramebuffer() ? flipped_y_pos_of_rect_bottom |
| - : swap_buffer_rect_.y(), |
| - swap_buffer_rect_.width(), |
| - swap_buffer_rect_.height()); |
| - } else { |
| - compositor_frame.gl_frame_data->sub_buffer_rect = |
| - gfx::Rect(output_surface_->SurfaceSize()); |
| - } |
| + // If supported, we can save significant bandwidth by only swapping the |
| + // damaged/scissored region (clamped to the viewport). The surface can |
| + // choose whether to do a full swap or partial swap. |
|
piman
2015/11/19 21:22:04
If we do that we need to fix all the OutputSurface
|
| + swap_buffer_rect_.Intersect(gfx::Rect(surface_size)); |
| + 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 = |
| + gfx::Rect(swap_buffer_rect_.x(), |
| + FlippedRootFramebuffer() ? flipped_y_pos_of_rect_bottom |
| + : swap_buffer_rect_.y(), |
| + swap_buffer_rect_.width(), swap_buffer_rect_.height()); |
| output_surface_->SwapBuffers(&compositor_frame); |
| // We always hold onto resources for an extra frame, to make sure we don't |