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

Unified Diff: ui/gfx/compositor/layer.cc

Issue 8247009: Explicit animation support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix VS2010 Created 9 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 | « ui/gfx/compositor/layer.h ('k') | ui/gfx/compositor/layer_animation_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/layer.cc
diff --git a/ui/gfx/compositor/layer.cc b/ui/gfx/compositor/layer.cc
index c094b1e67bec1481de59eee59bf8bea6e9e7b0eb..d771dc356404d1776f731757816182d56f10713a 100644
--- a/ui/gfx/compositor/layer.cc
+++ b/ui/gfx/compositor/layer.cc
@@ -9,7 +9,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "ui/base/animation/animation.h"
-#include "ui/gfx/compositor/layer_animator.h"
+#include "ui/gfx/compositor/layer_animation_manager.h"
#include "ui/gfx/canvas_skia.h"
#include "ui/gfx/interpolated_transform.h"
#include "ui/gfx/point3.h"
@@ -109,7 +109,7 @@ bool Layer::Contains(const Layer* other) const {
void Layer::SetAnimation(Animation* animation) {
if (animation) {
if (!animator_.get())
- animator_.reset(new LayerAnimator(this));
+ animator_.reset(new LayerAnimationManager(this));
animation->Start();
animator_->SetAnimation(animation);
} else {
@@ -118,7 +118,7 @@ void Layer::SetAnimation(Animation* animation) {
}
void Layer::SetTransform(const ui::Transform& transform) {
- StopAnimatingIfNecessary(LayerAnimator::TRANSFORM);
+ StopAnimatingIfNecessary(LayerAnimationManager::TRANSFORM);
if (animator_.get() && animator_->IsRunning()) {
animator_->AnimateTransform(transform);
return;
@@ -127,7 +127,7 @@ void Layer::SetTransform(const ui::Transform& transform) {
}
void Layer::SetBounds(const gfx::Rect& bounds) {
- StopAnimatingIfNecessary(LayerAnimator::LOCATION);
+ StopAnimatingIfNecessary(LayerAnimationManager::LOCATION);
if (animator_.get() && animator_->IsRunning() &&
bounds.size() == bounds_.size()) {
animator_->AnimateToPoint(bounds.origin());
@@ -143,7 +143,7 @@ gfx::Rect Layer::GetTargetBounds() const {
}
void Layer::SetOpacity(float opacity) {
- StopAnimatingIfNecessary(LayerAnimator::OPACITY);
+ StopAnimatingIfNecessary(LayerAnimationManager::OPACITY);
if (animator_.get() && animator_->IsRunning()) {
animator_->AnimateOpacity(opacity);
return;
@@ -439,23 +439,23 @@ bool Layer::GetTransformRelativeTo(const Layer* ancestor,
}
void Layer::StopAnimatingIfNecessary(
- LayerAnimator::AnimationProperty property) {
+ LayerAnimationManager::AnimationProperty property) {
if (!animator_.get() || !animator_->IsRunning() ||
!animator_->got_initial_tick()) {
return;
}
- if (property != LayerAnimator::LOCATION &&
- animator_->IsAnimating(LayerAnimator::LOCATION)) {
+ if (property != LayerAnimationManager::LOCATION &&
+ animator_->IsAnimating(LayerAnimationManager::LOCATION)) {
SetBoundsImmediately(
gfx::Rect(animator_->GetTargetPoint(), bounds_.size()));
}
- if (property != LayerAnimator::OPACITY &&
- animator_->IsAnimating(LayerAnimator::OPACITY)) {
+ if (property != LayerAnimationManager::OPACITY &&
+ animator_->IsAnimating(LayerAnimationManager::OPACITY)) {
SetOpacityImmediately(animator_->GetTargetOpacity());
}
- if (property != LayerAnimator::TRANSFORM &&
- animator_->IsAnimating(LayerAnimator::TRANSFORM)) {
+ if (property != LayerAnimationManager::TRANSFORM &&
+ animator_->IsAnimating(LayerAnimationManager::TRANSFORM)) {
SetTransformImmediately(animator_->GetTargetTransform());
}
animator_.reset();
« no previous file with comments | « ui/gfx/compositor/layer.h ('k') | ui/gfx/compositor/layer_animation_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698