| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 static PassRefPtr<TimingFunction> reverse(const CubicBezierTimingFunction* t
imefunc); | 51 static PassRefPtr<TimingFunction> reverse(const CubicBezierTimingFunction* t
imefunc); |
| 52 static PassRefPtr<TimingFunction> reverse(const ChainedTimingFunction* timef
unc); | 52 static PassRefPtr<TimingFunction> reverse(const ChainedTimingFunction* timef
unc); |
| 53 static PassRefPtr<TimingFunction> reverse(const TimingFunction* timefunc); | 53 static PassRefPtr<TimingFunction> reverse(const TimingFunction* timefunc); |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 class CompositorAnimations { | 56 class CompositorAnimations { |
| 57 public: | 57 public: |
| 58 static CompositorAnimations* instance() { return instance(0); } | 58 static CompositorAnimations* instance() { return instance(0); } |
| 59 static void setInstanceForTesting(CompositorAnimations* newInstance) { insta
nce(newInstance); } | 59 static void setInstanceForTesting(CompositorAnimations* newInstance) { insta
nce(newInstance); } |
| 60 | 60 |
| 61 virtual bool isCandidateForCompositorAnimation(const Timing&, const Animatio
nEffect&); | 61 virtual bool isCandidateForAnimationOnCompositor(const Timing&, const Animat
ionEffect&); |
| 62 virtual bool canStartCompositorAnimation(const Element&); | 62 virtual bool canStartAnimationOnCompositor(const Element&); |
| 63 virtual void startCompositorAnimation(const Element&, const Timing&, const A
nimationEffect&, Vector<int>& startedAnimationIds); | 63 // FIXME: This should return void. We should know ahead of time whether thes
e animations can be started. |
| 64 virtual void cancelCompositorAnimation(const Element&, int id); | 64 virtual bool startAnimationOnCompositor(const Element&, const Timing&, const
AnimationEffect&, Vector<int>& startedAnimationIds); |
| 65 virtual void cancelAnimationOnCompositor(const Element&, int id); |
| 65 | 66 |
| 66 protected: | 67 protected: |
| 67 CompositorAnimations() { } | 68 CompositorAnimations() { } |
| 68 | 69 |
| 69 private: | 70 private: |
| 70 static CompositorAnimations* instance(CompositorAnimations* newInstance) | 71 static CompositorAnimations* instance(CompositorAnimations* newInstance) |
| 71 { | 72 { |
| 72 static CompositorAnimations* instance = new CompositorAnimations(); | 73 static CompositorAnimations* instance = new CompositorAnimations(); |
| 73 if (newInstance) { | 74 if (newInstance) { |
| 74 instance = newInstance; | 75 instance = newInstance; |
| 75 } | 76 } |
| 76 return instance; | 77 return instance; |
| 77 } | 78 } |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 } // namespace WebCore | 81 } // namespace WebCore |
| 81 | 82 |
| 82 #endif | 83 #endif |
| OLD | NEW |