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

Side by Side Diff: cc/layers/layer_impl.cc

Issue 948243003: cc: Misc animation refactoring (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address danakj's comment. Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/layer_impl.h" 5 #include "cc/layers/layer_impl.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "base/trace_event/trace_event_argument.h" 10 #include "base/trace_event/trace_event_argument.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 num_descendants_that_draw_content_(0), 76 num_descendants_that_draw_content_(0),
77 draw_depth_(0.f), 77 draw_depth_(0.f),
78 needs_push_properties_(false), 78 needs_push_properties_(false),
79 num_dependents_need_push_properties_(0), 79 num_dependents_need_push_properties_(0),
80 sorting_context_id_(0), 80 sorting_context_id_(0),
81 current_draw_mode_(DRAW_MODE_NONE), 81 current_draw_mode_(DRAW_MODE_NONE),
82 frame_timing_requests_dirty_(false) { 82 frame_timing_requests_dirty_(false) {
83 DCHECK_GT(layer_id_, 0); 83 DCHECK_GT(layer_id_, 0);
84 DCHECK(layer_tree_impl_); 84 DCHECK(layer_tree_impl_);
85 layer_tree_impl_->RegisterLayer(this); 85 layer_tree_impl_->RegisterLayer(this);
86 AnimationRegistrar* registrar = layer_tree_impl_->animationRegistrar(); 86 AnimationRegistrar* registrar = layer_tree_impl_->GetAnimationRegistrar();
87 layer_animation_controller_ = 87 layer_animation_controller_ =
88 registrar->GetAnimationControllerForId(layer_id_); 88 registrar->GetAnimationControllerForId(layer_id_);
89 layer_animation_controller_->AddValueObserver(this); 89 layer_animation_controller_->AddValueObserver(this);
90 if (IsActive()) { 90 if (IsActive()) {
91 layer_animation_controller_->set_value_provider(this); 91 layer_animation_controller_->set_value_provider(this);
92 layer_animation_controller_->set_layer_animation_delegate(this); 92 layer_animation_controller_->set_layer_animation_delegate(this);
93 } 93 }
94 SetNeedsPushProperties(); 94 SetNeedsPushProperties();
95 } 95 }
96 96
(...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1584 SetNeedsPushProperties(); 1584 SetNeedsPushProperties();
1585 layer_tree_impl()->set_needs_update_draw_properties(); 1585 layer_tree_impl()->set_needs_update_draw_properties();
1586 if (should_have_render_surface) { 1586 if (should_have_render_surface) {
1587 render_surface_ = make_scoped_ptr(new RenderSurfaceImpl(this)); 1587 render_surface_ = make_scoped_ptr(new RenderSurfaceImpl(this));
1588 return; 1588 return;
1589 } 1589 }
1590 render_surface_.reset(); 1590 render_surface_.reset();
1591 } 1591 }
1592 1592
1593 } // namespace cc 1593 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698