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

Side by Side Diff: ui/gfx/compositor/layer_animation_element.cc

Issue 8486020: compositor_unittests target is unimplmented on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Nico's comments (#2) Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/gfx/compositor/layer_animation_element.h" 5 #include "ui/gfx/compositor/layer_animation_element.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "ui/base/animation/tween.h" 8 #include "ui/base/animation/tween.h"
9 #include "ui/gfx/compositor/layer_animation_delegate.h" 9 #include "ui/gfx/compositor/layer_animation_delegate.h"
10 10
(...skipping 28 matching lines...) Expand all
39 target_(target) { 39 target_(target) {
40 } 40 }
41 virtual ~TransformTransition() {} 41 virtual ~TransformTransition() {}
42 42
43 protected: 43 protected:
44 virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE { 44 virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {
45 start_ = delegate->GetTransformForAnimation(); 45 start_ = delegate->GetTransformForAnimation();
46 } 46 }
47 47
48 virtual void OnProgress(double t, LayerAnimationDelegate* delegate) OVERRIDE { 48 virtual void OnProgress(double t, LayerAnimationDelegate* delegate) OVERRIDE {
49 #if !defined(OS_MACOSX)
piman 2011/11/16 20:55:59 Why? I don't see what's mac-adverse here.
dhollowa 2011/11/16 23:28:59 ui/base/animation/tween.h:41 is #ifdef'd out on Ma
49 delegate->SetTransformFromAnimation( 50 delegate->SetTransformFromAnimation(
50 Tween::ValueBetween(t, start_, target_)); 51 Tween::ValueBetween(t, start_, target_));
52 #endif
51 } 53 }
52 54
53 virtual void OnGetTarget(TargetValue* target) const OVERRIDE { 55 virtual void OnGetTarget(TargetValue* target) const OVERRIDE {
54 target->transform = target_; 56 target->transform = target_;
55 } 57 }
56 58
57 virtual void OnAbort() OVERRIDE {} 59 virtual void OnAbort() OVERRIDE {}
58 60
59 private: 61 private:
60 static const AnimatableProperties& GetProperties() { 62 static const AnimatableProperties& GetProperties() {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 return new OpacityTransition(opacity, duration); 212 return new OpacityTransition(opacity, duration);
211 } 213 }
212 214
213 // static 215 // static
214 LayerAnimationElement* LayerAnimationElement::CreatePauseElement( 216 LayerAnimationElement* LayerAnimationElement::CreatePauseElement(
215 const AnimatableProperties& properties, base::TimeDelta duration) { 217 const AnimatableProperties& properties, base::TimeDelta duration) {
216 return new Pause(properties, duration); 218 return new Pause(properties, duration);
217 } 219 }
218 220
219 } // namespace ui 221 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698