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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2632463005: cc: Ensure that large damage doesn't register as "frame has no damage" (Closed)
Patch Set: update Created 3 years, 11 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/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index b7778b41aa861dfd7cf618bce0136ed52cb30e91..7f2ef67b34acd6f28d9243223d816d8825cfb685 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -781,9 +781,11 @@ DrawResult LayerTreeHostImpl::CalculateRenderPasses(FrameData* frame) {
// If the root render surface has no visible damage, then don't generate a
// frame at all.
RenderSurfaceImpl* root_surface = active_tree_->RootRenderSurface();
+ gfx::Rect damage_rect;
+ bool is_rect_valid =
+ root_surface->damage_tracker()->GetDamageRectIfValid(&damage_rect);
bool root_surface_has_no_visible_damage =
- !root_surface->damage_tracker()->current_damage_rect().Intersects(
- root_surface->content_rect());
+ is_rect_valid && !damage_rect.Intersects(root_surface->content_rect());
bool root_surface_has_contributing_layers =
!root_surface->layer_list().empty();
bool hud_wants_to_draw_ = active_tree_->hud_layer() &&

Powered by Google App Engine
This is Rietveld 408576698