diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-12 02:49:22 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-12 02:49:22 +0000 |
commit | cb67b82bb0f20da75aee0cca0b48333497422f31 (patch) | |
tree | a44051ae690816d969c19b263bbcda5537ae8e2d /ui | |
parent | ff373a3a658588390dff82708cd8fe3fa0b52519 (diff) | |
download | chromium_src-cb67b82bb0f20da75aee0cca0b48333497422f31.zip chromium_src-cb67b82bb0f20da75aee0cca0b48333497422f31.tar.gz chromium_src-cb67b82bb0f20da75aee0cca0b48333497422f31.tar.bz2 |
cc: Chromify the Animation and LayerAnimationController classes
Style-only change. Make the Animation, AnimationEvent, AnimationCurve,
KeyframedAnimationCurve, and LayerAnimationController classes use
chromium style.
R=jamesr,enne
TBR=piman
Review URL: https://codereview.chromium.org/12517003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187463 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/compositor/float_animation_curve_adapter.cc | 6 | ||||
-rw-r--r-- | ui/compositor/float_animation_curve_adapter.h | 6 | ||||
-rw-r--r-- | ui/compositor/layer.cc | 6 | ||||
-rw-r--r-- | ui/compositor/layer_animation_element.cc | 4 | ||||
-rw-r--r-- | ui/compositor/layer_animation_sequence.cc | 6 | ||||
-rw-r--r-- | ui/compositor/layer_animator.cc | 8 | ||||
-rw-r--r-- | ui/compositor/transform_animation_curve_adapter.cc | 6 | ||||
-rw-r--r-- | ui/compositor/transform_animation_curve_adapter.h | 6 |
8 files changed, 24 insertions, 24 deletions
diff --git a/ui/compositor/float_animation_curve_adapter.cc b/ui/compositor/float_animation_curve_adapter.cc index 72949659..e97fbf0 100644 --- a/ui/compositor/float_animation_curve_adapter.cc +++ b/ui/compositor/float_animation_curve_adapter.cc @@ -17,11 +17,11 @@ FloatAnimationCurveAdapter::FloatAnimationCurveAdapter( duration_(duration) { } -double FloatAnimationCurveAdapter::duration() const { +double FloatAnimationCurveAdapter::Duration() const { return duration_.InSecondsF(); } -scoped_ptr<cc::AnimationCurve> FloatAnimationCurveAdapter::clone() const { +scoped_ptr<cc::AnimationCurve> FloatAnimationCurveAdapter::Clone() const { scoped_ptr<FloatAnimationCurveAdapter> to_return( new FloatAnimationCurveAdapter(tween_type_, initial_value_, @@ -30,7 +30,7 @@ scoped_ptr<cc::AnimationCurve> FloatAnimationCurveAdapter::clone() const { return to_return.PassAs<cc::AnimationCurve>(); } -float FloatAnimationCurveAdapter::getValue(double t) const { +float FloatAnimationCurveAdapter::GetValue(double t) const { if (t >= duration_.InSecondsF()) return target_value_; if (t <= 0.0) diff --git a/ui/compositor/float_animation_curve_adapter.h b/ui/compositor/float_animation_curve_adapter.h index 36509ec..d1bf86b 100644 --- a/ui/compositor/float_animation_curve_adapter.h +++ b/ui/compositor/float_animation_curve_adapter.h @@ -21,9 +21,9 @@ class FloatAnimationCurveAdapter : public cc::FloatAnimationCurve { virtual ~FloatAnimationCurveAdapter() { } // FloatAnimationCurve implementation. - virtual double duration() const OVERRIDE; - virtual scoped_ptr<cc::AnimationCurve> clone() const OVERRIDE; - virtual float getValue(double t) const OVERRIDE; + virtual double Duration() const OVERRIDE; + virtual scoped_ptr<cc::AnimationCurve> Clone() const OVERRIDE; + virtual float GetValue(double t) const OVERRIDE; private: Tween::Type tween_type_; diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc index 4d76470..49a3724 100644 --- a/ui/compositor/layer.cc +++ b/ui/compositor/layer.cc @@ -812,7 +812,7 @@ void Layer::AddThreadedAnimation(scoped_ptr<cc::Animation> animation) { // Until this layer has a compositor (and hence cc_layer_ has a // LayerTreeHost), addAnimation will fail. if (GetCompositor()) - cc_layer_->addAnimation(animation.Pass()); + cc_layer_->AddAnimation(animation.Pass()); else pending_threaded_animations_.push_back(animation.Pass()); } @@ -836,7 +836,7 @@ struct HasAnimationId { void Layer::RemoveThreadedAnimation(int animation_id) { DCHECK(cc_layer_); if (pending_threaded_animations_.size() == 0) { - cc_layer_->removeAnimation(animation_id); + cc_layer_->RemoveAnimation(animation_id); return; } @@ -853,7 +853,7 @@ void Layer::SendPendingThreadedAnimations() { pending_threaded_animations_.begin(); it != pending_threaded_animations_.end(); ++it) - cc_layer_->addAnimation(pending_threaded_animations_.take(it)); + cc_layer_->AddAnimation(pending_threaded_animations_.take(it)); pending_threaded_animations_.clear(); diff --git a/ui/compositor/layer_animation_element.cc b/ui/compositor/layer_animation_element.cc index 79f4a7f..4952583 100644 --- a/ui/compositor/layer_animation_element.cc +++ b/ui/compositor/layer_animation_element.cc @@ -413,7 +413,7 @@ class ThreadedLayerAnimationElement : public LayerAnimationElement { } set_effective_start_time(base::TimeTicks()); scoped_ptr<cc::Animation> animation = CreateCCAnimation(); - animation->setNeedsSynchronizedStartTime(true); + animation->set_needs_synchronized_start_time(true); delegate->AddThreadedAnimation(animation.Pass()); } @@ -462,7 +462,7 @@ class ThreadedOpacityTransition : public ThreadedLayerAnimationElement { target_, duration())); scoped_ptr<cc::Animation> animation( - cc::Animation::create(animation_curve.Pass(), + cc::Animation::Create(animation_curve.Pass(), animation_id(), animation_group_id(), cc::Animation::Opacity)); diff --git a/ui/compositor/layer_animation_sequence.cc b/ui/compositor/layer_animation_sequence.cc index 10ba702..a8f4d1c 100644 --- a/ui/compositor/layer_animation_sequence.cc +++ b/ui/compositor/layer_animation_sequence.cc @@ -207,18 +207,18 @@ void LayerAnimationSequence::RemoveObserver(LayerAnimationObserver* observer) { void LayerAnimationSequence::OnThreadedAnimationStarted( const cc::AnimationEvent& event) { - if (elements_.empty() || event.groupId != animation_group_id_) + if (elements_.empty() || event.group_id != animation_group_id_) return; size_t current_index = last_element_ % elements_.size(); const LayerAnimationElement::AnimatableProperties& element_properties = elements_[current_index]->properties(); LayerAnimationElement::AnimatableProperty event_property = - LayerAnimationElement::ToAnimatableProperty(event.targetProperty); + LayerAnimationElement::ToAnimatableProperty(event.target_property); DCHECK(element_properties.find(event_property) != element_properties.end()); elements_[current_index]->set_effective_start_time( base::TimeTicks::FromInternalValue( - event.monotonicTime * base::Time::kMicrosecondsPerSecond)); + event.monotonic_time * base::Time::kMicrosecondsPerSecond)); } void LayerAnimationSequence::OnScheduled() { diff --git a/ui/compositor/layer_animator.cc b/ui/compositor/layer_animator.cc index e18c796..2324434 100644 --- a/ui/compositor/layer_animator.cc +++ b/ui/compositor/layer_animator.cc @@ -319,14 +319,14 @@ void LayerAnimator::RemoveObserver(LayerAnimationObserver* observer) { void LayerAnimator::OnThreadedAnimationStarted( const cc::AnimationEvent& event) { LayerAnimationElement::AnimatableProperty property = - LayerAnimationElement::ToAnimatableProperty(event.targetProperty); + LayerAnimationElement::ToAnimatableProperty(event.target_property); RunningAnimation* running = GetRunningAnimation(property); if (!running) return; DCHECK(running->is_sequence_alive()); - if (running->sequence()->animation_group_id() != event.groupId) + if (running->sequence()->animation_group_id() != event.group_id) return; running->sequence()->OnThreadedAnimationStarted(event); @@ -334,7 +334,7 @@ void LayerAnimator::OnThreadedAnimationStarted( return; base::TimeTicks start_time = base::TimeTicks::FromInternalValue( - event.monotonicTime * base::Time::kMicrosecondsPerSecond); + event.monotonic_time * base::Time::kMicrosecondsPerSecond); running->sequence()->set_waiting_for_group_start(false); @@ -345,7 +345,7 @@ void LayerAnimator::OnThreadedAnimationStarted( iter != running_animations_.end(); ++iter) { // Ensure that each sequence is only Started once, regardless of the // number of sequences in the group that have threaded first elements. - if (((*iter).sequence()->animation_group_id() == event.groupId) && + if (((*iter).sequence()->animation_group_id() == event.group_id) && !(*iter).sequence()->IsFirstElementThreaded() && (*iter).sequence()->waiting_for_group_start()) { (*iter).sequence()->set_start_time(start_time); diff --git a/ui/compositor/transform_animation_curve_adapter.cc b/ui/compositor/transform_animation_curve_adapter.cc index f7ad0f1..f2727b5 100644 --- a/ui/compositor/transform_animation_curve_adapter.cc +++ b/ui/compositor/transform_animation_curve_adapter.cc @@ -22,11 +22,11 @@ TransformAnimationCurveAdapter::TransformAnimationCurveAdapter( TransformAnimationCurveAdapter::~TransformAnimationCurveAdapter() { } -double TransformAnimationCurveAdapter::duration() const { +double TransformAnimationCurveAdapter::Duration() const { return duration_.InSecondsF(); } -scoped_ptr<cc::AnimationCurve> TransformAnimationCurveAdapter::clone() const { +scoped_ptr<cc::AnimationCurve> TransformAnimationCurveAdapter::Clone() const { scoped_ptr<TransformAnimationCurveAdapter> to_return( new TransformAnimationCurveAdapter(tween_type_, initial_value_, @@ -35,7 +35,7 @@ scoped_ptr<cc::AnimationCurve> TransformAnimationCurveAdapter::clone() const { return to_return.PassAs<cc::AnimationCurve>(); } -gfx::Transform TransformAnimationCurveAdapter::getValue( +gfx::Transform TransformAnimationCurveAdapter::GetValue( double t) const { if (t >= duration_.InSecondsF()) return target_value_; diff --git a/ui/compositor/transform_animation_curve_adapter.h b/ui/compositor/transform_animation_curve_adapter.h index 795de84..a60dd83 100644 --- a/ui/compositor/transform_animation_curve_adapter.h +++ b/ui/compositor/transform_animation_curve_adapter.h @@ -23,9 +23,9 @@ class TransformAnimationCurveAdapter :public cc::TransformAnimationCurve { virtual ~TransformAnimationCurveAdapter(); // TransformAnimationCurve implementation. - virtual double duration() const OVERRIDE; - virtual scoped_ptr<AnimationCurve> clone() const OVERRIDE; - virtual gfx::Transform getValue(double t) const OVERRIDE; + virtual double Duration() const OVERRIDE; + virtual scoped_ptr<AnimationCurve> Clone() const OVERRIDE; + virtual gfx::Transform GetValue(double t) const OVERRIDE; private: Tween::Type tween_type_; |