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

Unified Diff: Source/core/animation/CompositorAnimationsImpl.h

Issue 68173013: Web Animations CSS: More cleaning of new CompositorAnimation code. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review fixes. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/animation/CompositorAnimations.cpp ('k') | Source/core/animation/CompositorAnimationsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/CompositorAnimationsImpl.h
diff --git a/Source/core/animation/CompositorAnimationsImpl.h b/Source/core/animation/CompositorAnimationsImpl.h
index 165efddf41b82156f4fd4a1b046908254af08e86..1f0c904d3b09c87ec044dafc59a52e1c80ff0fb8 100644
--- a/Source/core/animation/CompositorAnimationsImpl.h
+++ b/Source/core/animation/CompositorAnimationsImpl.h
@@ -28,6 +28,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "core/animation/AnimationEffect.h"
+#include "core/animation/KeyframeAnimationEffect.h"
+#include "core/animation/Timing.h"
+#include "core/platform/animation/TimingFunction.h"
+#include "public/platform/WebAnimation.h"
+
namespace WebCore {
class CompositorAnimationsKeyframeEffectHelper {
@@ -35,20 +41,28 @@ private:
typedef Vector<std::pair<double, const AnimationEffect::CompositableValue*> > KeyframeValues;
static PassOwnPtr<Vector<CSSPropertyID> > getProperties(const KeyframeAnimationEffect*);
- static PassOwnPtr<KeyframeValues> getKeyframeValuesForProperty(const KeyframeAnimationEffect*, CSSPropertyID, double zero, double scale, bool reverse = false);
- static PassOwnPtr<KeyframeValues> getKeyframeValuesForProperty(const KeyframeAnimationEffect::PropertySpecificKeyframeGroup*, double zero, double scale, bool reverse);
+ static PassOwnPtr<KeyframeValues> getKeyframeValuesForProperty(const KeyframeAnimationEffect*, CSSPropertyID, double scale, bool reverse = false);
+ static PassOwnPtr<KeyframeValues> getKeyframeValuesForProperty(const KeyframeAnimationEffect::PropertySpecificKeyframeGroup*, double scale, bool reverse);
friend class CompositorAnimationsImpl;
};
class CompositorAnimationsImpl {
private:
+ struct CompositorTiming {
+ bool reverse;
+ bool alternate;
+ double scaledDuration;
+ double scaledTimeOffset;
+ int adjustedIterationCount;
+ };
+ static bool convertTimingForCompositor(const Timing&, CompositorTiming& out);
static bool isCandidateForCompositor(const Keyframe&);
static bool isCandidateForCompositor(const KeyframeAnimationEffect&);
static bool isCandidateForCompositor(const Timing&, const KeyframeAnimationEffect::KeyframeVector&);
- static bool isCandidateForCompositor(const TimingFunction&, const KeyframeAnimationEffect::KeyframeVector&, double frameOffset = 0);
+ static bool isCandidateForCompositor(const TimingFunction&, const KeyframeAnimationEffect::KeyframeVector*, bool isNestedCall = false);
static void getCompositorAnimations(const Timing&, const KeyframeAnimationEffect&, Vector<OwnPtr<blink::WebAnimation> >& animations);
template<typename PlatformAnimationCurveType, typename PlatformAnimationKeyframeType>
« no previous file with comments | « Source/core/animation/CompositorAnimations.cpp ('k') | Source/core/animation/CompositorAnimationsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698