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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 13939005: cc: Add strict layer property change checking and handle bounds changes during paint. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/CHECK/DCHECK/ Created 7 years, 8 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
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698