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

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

Issue 23874019: Web Animations CSS: Start running animations on the compositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and rename hasActiveAnimationOnCompositor to hasActiveAnimationsOnCompositor 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
« no previous file with comments | « Source/core/animation/DocumentTimeline.cpp ('k') | Source/core/animation/Player.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 class KeyframeAnimationEffect : public AnimationEffect { 75 class KeyframeAnimationEffect : public AnimationEffect {
76 public: 76 public:
77 typedef Vector<RefPtr<Keyframe> > KeyframeVector; 77 typedef Vector<RefPtr<Keyframe> > KeyframeVector;
78 // FIXME: Implement accumulation. 78 // FIXME: Implement accumulation.
79 static PassRefPtr<KeyframeAnimationEffect> create(const KeyframeVector& keyf rames) 79 static PassRefPtr<KeyframeAnimationEffect> create(const KeyframeVector& keyf rames)
80 { 80 {
81 return adoptRef(new KeyframeAnimationEffect(keyframes)); 81 return adoptRef(new KeyframeAnimationEffect(keyframes));
82 } 82 }
83 83
84 virtual bool affects(CSSPropertyID property) OVERRIDE
85 {
86 ensureKeyframeGroups();
87 return m_keyframeGroups->contains(property);
88 }
89
84 // AnimationEffect implementation. 90 // AnimationEffect implementation.
85 virtual PassOwnPtr<CompositableValueMap> sample(int iteration, double fracti on) const OVERRIDE; 91 virtual PassOwnPtr<CompositableValueMap> sample(int iteration, double fracti on) const OVERRIDE;
86 92
87 // FIXME: Implement setFrames() 93 // FIXME: Implement setFrames()
88 const KeyframeVector& getFrames() const { return m_keyframes; } 94 const KeyframeVector& getFrames() const { return m_keyframes; }
89 95
90 virtual bool isKeyframeAnimationEffect() const OVERRIDE { return true; } 96 virtual bool isKeyframeAnimationEffect() const OVERRIDE { return true; }
91 97
92 private: 98 private:
93 class PropertySpecificKeyframe { 99 class PropertySpecificKeyframe {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 141
136 // FIXME: Come up with public API for the PropertySpecificKeyframe stuff and remove this. 142 // FIXME: Come up with public API for the PropertySpecificKeyframe stuff and remove this.
137 friend class CompositorAnimationsKeyframeEffectHelper; 143 friend class CompositorAnimationsKeyframeEffectHelper;
138 }; 144 };
139 145
140 DEFINE_TYPE_CASTS(KeyframeAnimationEffect, AnimationEffect, value, value->isKeyf rameAnimationEffect(), value.isKeyframeAnimationEffect()); 146 DEFINE_TYPE_CASTS(KeyframeAnimationEffect, AnimationEffect, value, value->isKeyf rameAnimationEffect(), value.isKeyframeAnimationEffect());
141 147
142 } // namespace WebCore 148 } // namespace WebCore
143 149
144 #endif // KeyframeAnimationEffect_h 150 #endif // KeyframeAnimationEffect_h
OLDNEW
« no previous file with comments | « Source/core/animation/DocumentTimeline.cpp ('k') | Source/core/animation/Player.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698