| Index: cc/output/gl_renderer.cc
|
| diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
|
| index 71861fb361d8b7dac8789e2fa311af09b4f014d7..c32ab20fdbc2267f3af0dd09ba3d6af97ea0f132 100644
|
| --- a/cc/output/gl_renderer.cc
|
| +++ b/cc/output/gl_renderer.cc
|
| @@ -401,6 +401,7 @@ GLRenderer::GLRenderer(const RendererSettings* settings,
|
| use_blend_equation_advanced_ = context_caps.blend_equation_advanced;
|
| use_blend_equation_advanced_coherent_ =
|
| context_caps.blend_equation_advanced_coherent;
|
| + use_swap_with_damage_ = context_caps.swap_buffers_with_damage;
|
|
|
| InitializeSharedObjects();
|
| }
|
| @@ -2905,6 +2906,7 @@ void GLRenderer::SwapBuffers(std::vector<ui::LatencyInfo> latency_info) {
|
| OutputSurfaceFrame output_frame;
|
| output_frame.latency_info = std::move(latency_info);
|
| output_frame.size = surface_size;
|
| + output_frame.swap_with_damage_rect = gfx::Rect(surface_size);
|
| if (use_partial_swap_) {
|
| // If supported, we can save significant bandwidth by only swapping the
|
| // damaged/scissored region (clamped to the viewport).
|
| @@ -2926,6 +2928,13 @@ void GLRenderer::SwapBuffers(std::vector<ui::LatencyInfo> latency_info) {
|
| output_frame.sub_buffer_rect = swap_buffer_rect_;
|
| }
|
|
|
| + if (use_swap_with_damage_) {
|
| + gfx::Rect swap_with_damage_rect;
|
| + if (overlay_processor_->GetSwapWithDamageRect(&swap_with_damage_rect)) {
|
| + output_frame.swap_with_damage_rect = swap_with_damage_rect;
|
| + }
|
| + }
|
| +
|
| swapping_overlay_resources_.push_back(std::move(pending_overlay_resources_));
|
| pending_overlay_resources_.clear();
|
|
|
|
|