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

Side by Side Diff: Source/core/animation/CompositorAnimations.h

Issue 23874019: Web Animations CSS: Start running animations on the compositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 /* 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 isCandidateForCompositorAnimation(const Timing&, const Animatio nEffect&);
62 virtual bool canStartCompositorAnimation(const Element&); 62 virtual bool canStartCompositorAnimation(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 bool startCompositorAnimation(const Element&, const Timing&, const A nimationEffect&, Vector<int>& startedAnimationIds);
shans 2013/11/18 01:02:06 Plus One. Should this FIXME be in Animation.h too?
dstockwell 2013/11/18 05:30:34 I think it's fine to just have it here, if this is
64 virtual void cancelCompositorAnimation(const Element&, int id); 65 virtual void cancelCompositorAnimation(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698