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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 650353003: Don't clobber active page scale animation with null pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a10d46b423c1e77b354494db0706179ec91ceea2..cc6f1be43d0da1a9ea89a82e0d203ab130e2c30e 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1818,8 +1818,10 @@ void LayerTreeHostImpl::ActivateSyncTree() {
if (time_source_client_adapter_ && time_source_client_adapter_->Active())
DCHECK(active_tree_->root_layer());
- page_scale_animation_ = active_tree_->TakePageScaleAnimation();
- if (page_scale_animation_) {
+ scoped_ptr<PageScaleAnimation> page_scale_animation =
+ active_tree_->TakePageScaleAnimation();
+ if (page_scale_animation) {
+ page_scale_animation_ = page_scale_animation.Pass();
SetNeedsAnimate();
client_->SetNeedsCommitOnImplThread();
client_->RenewTreePriority();
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698