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

Unified Diff: cc/output/direct_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 | « no previous file | cc/output/gl_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/direct_renderer.cc
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc
index 600805ad8c71cbb386c2f40de5c9e4757e197b92..4acd9c142ad5b3ef95638a574270d774b3d0a935 100644
--- a/cc/output/direct_renderer.cc
+++ b/cc/output/direct_renderer.cc
@@ -205,7 +205,9 @@
DrawingFrame frame;
frame.render_passes_in_draw_order = render_passes_in_draw_order;
frame.root_render_pass = root_render_pass;
- frame.root_damage_rect = root_render_pass->damage_rect;
+ frame.root_damage_rect = Capabilities().using_partial_swap
+ ? root_render_pass->damage_rect
+ : root_render_pass->output_rect;
frame.root_damage_rect.Union(overlay_processor_->GetAndResetOverlayDamage());
frame.root_damage_rect.Intersect(gfx::Rect(device_viewport_rect.size()));
frame.device_viewport_rect = device_viewport_rect;
@@ -224,7 +226,8 @@
if (output_surface_->IsDisplayedAsOverlayPlane()) {
// Create the overlay candidate for the output surface, and mark it as
- // always handled.
+ // always
+ // handled.
OverlayCandidate output_surface_plane;
output_surface_plane.display_rect =
gfx::RectF(root_render_pass->output_rect);
@@ -251,18 +254,9 @@
&frame.ca_layer_overlay_list, &frame.root_damage_rect);
}
- // The damage rect might be empty now, but if empty swap isn't allowed we
- // still have to draw.
- bool should_draw = has_copy_requests || !frame.root_damage_rect.IsEmpty() ||
- !Capabilities().allow_empty_swap;
- // If we have to draw but don't support partial swap the whole output should
- // be considered damaged.
- if (should_draw && !Capabilities().using_partial_swap)
- frame.root_damage_rect = root_render_pass->output_rect;
-
// If all damage is being drawn with overlays or CALayers then skip drawing
// the render passes.
- if (!should_draw) {
+ if (frame.root_damage_rect.IsEmpty() && !has_copy_requests) {
BindFramebufferToOutputSurface(&frame);
} else {
for (const auto& pass : *render_passes_in_draw_order) {
« no previous file with comments | « no previous file | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698