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

Unified Diff: webkit/compositor/WebAnimationImpl.cpp

Issue 10920056: Make cc_unittests and webkit_compositor_unittests executable always (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename to webkit_compositor_bindings Created 8 years, 4 months 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 | « webkit/compositor/WebAnimationImpl.h ('k') | webkit/compositor/WebAnimationTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/compositor/WebAnimationImpl.cpp
diff --git a/webkit/compositor/WebAnimationImpl.cpp b/webkit/compositor/WebAnimationImpl.cpp
deleted file mode 100644
index bbae89bd254a324fe1bdbb95e352c1ec91868464..0000000000000000000000000000000000000000
--- a/webkit/compositor/WebAnimationImpl.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-
-#include "WebAnimationImpl.h"
-
-#include "CCActiveAnimation.h"
-#include "CCAnimationCurve.h"
-#include "WebFloatAnimationCurveImpl.h"
-#include "WebTransformAnimationCurveImpl.h"
-#include <public/WebAnimation.h>
-#include <public/WebAnimationCurve.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-using WebCore::CCActiveAnimation;
-
-namespace WebKit {
-
-WebAnimation* WebAnimation::create(const WebAnimationCurve& curve, TargetProperty targetProperty, int animationId)
-{
- return new WebAnimationImpl(curve, targetProperty, animationId, 0);
-}
-
-WebAnimationImpl::WebAnimationImpl(const WebAnimationCurve& webCurve, TargetProperty targetProperty, int animationId, int groupId)
-{
- static int nextAnimationId = 1;
- static int nextGroupId = 1;
- if (!animationId)
- animationId = nextAnimationId++;
- if (!groupId)
- groupId = nextGroupId++;
-
- WebAnimationCurve::AnimationCurveType curveType = webCurve.type();
- OwnPtr<WebCore::CCAnimationCurve> curve;
- switch (curveType) {
- case WebAnimationCurve::AnimationCurveTypeFloat: {
- const WebFloatAnimationCurveImpl* floatCurveImpl = static_cast<const WebFloatAnimationCurveImpl*>(&webCurve);
- curve = floatCurveImpl->cloneToCCAnimationCurve();
- break;
- }
- case WebAnimationCurve::AnimationCurveTypeTransform: {
- const WebTransformAnimationCurveImpl* transformCurveImpl = static_cast<const WebTransformAnimationCurveImpl*>(&webCurve);
- curve = transformCurveImpl->cloneToCCAnimationCurve();
- break;
- }
- }
- m_animation = CCActiveAnimation::create(curve.release(), animationId, groupId, static_cast<WebCore::CCActiveAnimation::TargetProperty>(targetProperty));
-}
-
-WebAnimationImpl::~WebAnimationImpl()
-{
-}
-
-int WebAnimationImpl::id()
-{
- return m_animation->id();
-}
-
-WebAnimation::TargetProperty WebAnimationImpl::targetProperty() const
-{
- return static_cast<WebAnimationImpl::TargetProperty>(m_animation->targetProperty());
-}
-
-int WebAnimationImpl::iterations() const
-{
- return m_animation->iterations();
-}
-
-void WebAnimationImpl::setIterations(int n)
-{
- m_animation->setIterations(n);
-}
-
-double WebAnimationImpl::startTime() const
-{
- return m_animation->startTime();
-}
-
-void WebAnimationImpl::setStartTime(double monotonicTime)
-{
- m_animation->setStartTime(monotonicTime);
-}
-
-double WebAnimationImpl::timeOffset() const
-{
- return m_animation->timeOffset();
-}
-
-void WebAnimationImpl::setTimeOffset(double monotonicTime)
-{
- m_animation->setTimeOffset(monotonicTime);
-}
-
-bool WebAnimationImpl::alternatesDirection() const
-{
- return m_animation->alternatesDirection();
-}
-
-void WebAnimationImpl::setAlternatesDirection(bool alternates)
-{
- m_animation->setAlternatesDirection(alternates);
-}
-
-PassOwnPtr<WebCore::CCActiveAnimation> WebAnimationImpl::cloneToCCAnimation()
-{
- OwnPtr<WebCore::CCActiveAnimation> toReturn(m_animation->clone(WebCore::CCActiveAnimation::NonControllingInstance));
- toReturn->setNeedsSynchronizedStartTime(true);
- return toReturn.release();
-}
-
-} // namespace WebKit
« no previous file with comments | « webkit/compositor/WebAnimationImpl.h ('k') | webkit/compositor/WebAnimationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698