Index: cc/trees/layer_tree_host.cc |
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc |
index 81f905199febf1e9ff9f533074e8fd8e37215487..8b3431fea877badfdfa0a750a7d1d78406cded0e 100644 |
--- a/cc/trees/layer_tree_host.cc |
+++ b/cc/trees/layer_tree_host.cc |
@@ -97,7 +97,8 @@ LayerTreeHost::LayerTreeHost(LayerTreeHostClient* client, |
trigger_idle_updates_(true), |
background_color_(SK_ColorWHITE), |
has_transparent_background_(false), |
- partial_texture_update_requests_(0) { |
+ partial_texture_update_requests_(0), |
+ in_paint_layer_contents_(false) { |
if (settings_.accelerated_animation_enabled) |
animation_registrar_ = AnimationRegistrar::Create(); |
s_num_layer_tree_instances++; |
@@ -935,6 +936,8 @@ bool LayerTreeHost::PaintLayerContents( |
RenderingStats* stats_ptr = |
debug_state_.RecordRenderingStats() ? &stats : NULL; |
+ in_paint_layer_contents_ = true; |
+ |
LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list); |
for (LayerIteratorType it = |
LayerIteratorType::Begin(&render_surface_layer_list); |
@@ -947,7 +950,7 @@ bool LayerTreeHost::PaintLayerContents( |
it->render_surface()->draw_opacity_is_animating()); |
need_more_updates |= PaintMasksForRenderSurface(*it, queue, stats_ptr); |
} else if (it.represents_itself()) { |
- DCHECK(!it->bounds().IsEmpty()); |
+ DCHECK(!it->paint_properties().bounds.IsEmpty()); |
it->Update(queue, &occlusion_tracker, stats_ptr); |
need_more_updates |= it->NeedMoreUpdates(); |
} |
@@ -955,6 +958,8 @@ bool LayerTreeHost::PaintLayerContents( |
occlusion_tracker.LeaveLayer(it); |
} |
+ in_paint_layer_contents_ = false; |
+ |
rendering_stats_instrumentation_->AddStats(stats); |
occlusion_tracker.overdraw_metrics()->RecordMetrics(this); |