diff options
Diffstat (limited to 'cc/trees/layer_tree_host.cc')
-rw-r--r-- | cc/trees/layer_tree_host.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc index 8bbf742..6e153d1 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()); |