Index: cc/trees/layer_tree_host.cc |
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc |
index 8bbf7429cede0c3a70f248922e9063744949a8f7..6e153d1f81ad11d3431e968c6584f2cf661ad64b 100644 |
--- a/cc/trees/layer_tree_host.cc |
+++ b/cc/trees/layer_tree_host.cc |
@@ -133,7 +133,8 @@ LayerTreeHost::LayerTreeHost(LayerTreeHostClient* client, |
partial_texture_update_requests_(0), |
in_paint_layer_contents_(false), |
total_frames_used_for_lcd_text_metrics_(0), |
- tree_id_(s_next_tree_id++) { |
+ tree_id_(s_next_tree_id++), |
+ next_commit_forces_redraw_(false) { |
if (settings_.accelerated_animation_enabled) |
animation_registrar_ = AnimationRegistrar::Create(); |
s_num_layer_tree_instances++; |
@@ -323,11 +324,17 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) { |
DCHECK(!host_impl->pending_tree()); |
host_impl->CreatePendingTree(); |
sync_tree = host_impl->pending_tree(); |
+ if (next_commit_forces_redraw_) |
+ sync_tree->ForceRedrawNextActivation(); |
} else { |
+ if (next_commit_forces_redraw_) |
+ host_impl->SetFullRootLayerDamage(); |
contents_texture_manager_->ReduceMemory(host_impl->resource_provider()); |
sync_tree = host_impl->active_tree(); |
} |
+ next_commit_forces_redraw_ = false; |
+ |
sync_tree->set_source_frame_number(source_frame_number()); |
if (needs_full_tree_sync_) |
@@ -565,6 +572,10 @@ void LayerTreeHost::SetNextCommitWaitsForActivation() { |
proxy_->SetNextCommitWaitsForActivation(); |
} |
+void LayerTreeHost::SetNextCommitForcesRedraw() { |
+ next_commit_forces_redraw_ = true; |
+} |
+ |
void LayerTreeHost::SetAnimationEvents(scoped_ptr<AnimationEventsVector> events, |
base::Time wall_clock_time) { |
DCHECK(proxy_->IsMainThread()); |