OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 class CompositorAnimations { | 45 class CompositorAnimations { |
46 public: | 46 public: |
47 static CompositorAnimations* instance() { return instance(0); } | 47 static CompositorAnimations* instance() { return instance(0); } |
48 static void setInstanceForTesting(CompositorAnimations* newInstance) { insta
nce(newInstance); } | 48 static void setInstanceForTesting(CompositorAnimations* newInstance) { insta
nce(newInstance); } |
49 | 49 |
50 virtual bool isCandidateForAnimationOnCompositor(const Timing&, const Elemen
t&, const AnimationPlayer*, const AnimationEffect&, double playerPlaybackRate); | 50 virtual bool isCandidateForAnimationOnCompositor(const Timing&, const Elemen
t&, const AnimationPlayer*, const AnimationEffect&, double playerPlaybackRate); |
51 virtual void cancelIncompatibleAnimationsOnCompositor(const Element&, const
AnimationPlayer&, const AnimationEffect&); | 51 virtual void cancelIncompatibleAnimationsOnCompositor(const Element&, const
AnimationPlayer&, const AnimationEffect&); |
52 virtual bool canStartAnimationOnCompositor(const Element&); | 52 virtual bool canStartAnimationOnCompositor(const Element&); |
53 // FIXME: This should return void. We should know ahead of time whether thes
e animations can be started. | 53 // FIXME: This should return void. We should know ahead of time whether thes
e animations can be started. |
54 virtual bool startAnimationOnCompositor(const Element&, int group, double st
artTime, double timeOffset, const Timing&, const AnimationPlayer*, const Animati
onEffect&, Vector<int>& startedAnimationIds, double playerPlaybackRate); | 54 virtual bool startAnimationOnCompositor(const Element&, int group, double st
artTime, double timeOffset, const Timing&, const AnimationPlayer*, const Animati
onEffect&, Vector<int>& startedAnimationIds, double playerPlaybackRate); |
55 virtual void cancelAnimationOnCompositor(const Element&, int id); | 55 virtual void cancelAnimationOnCompositor(const Element&, const AnimationPlay
er*, int id); |
56 virtual void pauseAnimationForTestingOnCompositor(const Element&, int id, do
uble pauseTime); | 56 virtual void pauseAnimationForTestingOnCompositor(const Element&, const Anim
ationPlayer*, int id, double pauseTime); |
57 | 57 |
58 virtual bool getAnimatedBoundingBox(FloatBox&, const AnimationEffect&, doubl
e minValue, double maxValue) const; | 58 virtual bool getAnimatedBoundingBox(FloatBox&, const AnimationEffect&, doubl
e minValue, double maxValue) const; |
59 protected: | 59 protected: |
60 CompositorAnimations() { } | 60 CompositorAnimations() { } |
61 | 61 |
62 private: | 62 private: |
63 static CompositorAnimations* instance(CompositorAnimations* newInstance) | 63 static CompositorAnimations* instance(CompositorAnimations* newInstance) |
64 { | 64 { |
65 static CompositorAnimations* instance = new CompositorAnimations(); | 65 static CompositorAnimations* instance = new CompositorAnimations(); |
66 if (newInstance) { | 66 if (newInstance) { |
67 instance = newInstance; | 67 instance = newInstance; |
68 } | 68 } |
69 return instance; | 69 return instance; |
70 } | 70 } |
71 }; | 71 }; |
72 | 72 |
73 } // namespace blink | 73 } // namespace blink |
74 | 74 |
75 #endif | 75 #endif |
OLD | NEW |