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

Unified Diff: cc/output/gl_renderer.cc

Issue 1491013005: Revert of DirectRenderer allows empty swap rects for CommitOverlayPlanes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « cc/output/direct_renderer.cc ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 5c30003e3e43643d8c896fe11c909cd63dc6987c..ea8031e145b51fd2be95277abefe5f0a80f00373 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -348,8 +348,6 @@
capabilities_.using_partial_swap =
settings_->partial_swap_enabled && context_caps.gpu.post_sub_buffer;
- capabilities_.allow_empty_swap = capabilities_.using_partial_swap ||
- context_caps.gpu.commit_overlay_planes;
DCHECK(!context_caps.gpu.iosurface || context_caps.gpu.texture_rectangle);
@@ -2620,14 +2618,11 @@
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());
+ swap_buffer_rect_.width(),
+ swap_buffer_rect_.height());
} else {
- // Expand the swap rect to the full surface unless it's empty, and empty
- // swap is allowed.
- 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 =
+ gfx::Rect(output_surface_->SurfaceSize());
}
output_surface_->SwapBuffers(&compositor_frame);
« no previous file with comments | « cc/output/direct_renderer.cc ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698