Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4114)

Unified Diff: cc/output/gl_renderer.cc

Issue 2693023002: Use SwapBuffersWithBounds on Chromecast (Closed)
Patch Set: Address danakj comments on PS1 Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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));

Powered by Google App Engine
This is Rietveld 408576698