Index: cc/output/gl_renderer.cc |
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc |
index f9cc3d71c3a232ca1d4b6aef52354891ed7e18c8..490e5d984e189772af45f842ad65a4c35ad2f223 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_coherent_ = |
context_caps.blend_equation_advanced_coherent; |
use_occlusion_query_ = context_caps.occlusion_query; |
+ use_swap_with_bounds_ = context_caps.swap_buffers_with_bounds; |
InitializeSharedObjects(); |
} |
@@ -2632,7 +2633,11 @@ 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; |
- if (use_partial_swap_) { |
+ if (use_swap_with_bounds_) { |
+ output_frame.content_bounds = current_frame()->root_content_bounds; |
+ swap_buffer_rect_ = gfx::Rect(surface_size); |
danakj
2017/02/16 18:54:19
Do you intentionally overload not supporting empty
halliwell
2017/02/23 18:01:46
Correct. The case of allow_empty_swap_ when use_p
|
+ output_frame.sub_buffer_rect = swap_buffer_rect_; |
+ } else if (use_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)); |