| Index: Source/core/platform/graphics/GraphicsLayer.cpp
|
| diff --git a/Source/core/platform/graphics/GraphicsLayer.cpp b/Source/core/platform/graphics/GraphicsLayer.cpp
|
| index 89552501ec05f2a78309f13fad809f9d277b95c2..68ec444602619a43b99b500acdaa7cd56fce2b29 100644
|
| --- a/Source/core/platform/graphics/GraphicsLayer.cpp
|
| +++ b/Source/core/platform/graphics/GraphicsLayer.cpp
|
| @@ -35,7 +35,6 @@
|
| #include "core/platform/graphics/GraphicsContext.h"
|
| #include "core/platform/graphics/GraphicsLayerFactory.h"
|
| #include "core/platform/graphics/LayoutRect.h"
|
| -#include "core/platform/graphics/chromium/AnimationTranslationUtil.h"
|
| #include "core/platform/graphics/chromium/TransformSkMatrix44Conversions.h"
|
| #include "core/platform/graphics/filters/SkiaImageFilterBuilder.h"
|
| #include "core/platform/graphics/skia/NativeImageSkia.h"
|
| @@ -44,9 +43,6 @@
|
| #include "wtf/CurrentTime.h"
|
| #include "wtf/HashMap.h"
|
| #include "wtf/HashSet.h"
|
| -#include "wtf/text/CString.h"
|
| -#include "wtf/text/StringBuilder.h"
|
| -#include "wtf/text/StringHash.h"
|
| #include "wtf/text/WTFString.h"
|
|
|
| #include "public/platform/Platform.h"
|
| @@ -343,16 +339,6 @@ void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const I
|
| m_client->paintContents(this, context, m_paintingPhase, clip);
|
| }
|
|
|
| -String GraphicsLayer::animationNameForTransition(AnimatedPropertyID property)
|
| -{
|
| - // | is not a valid identifier character in CSS, so this can never conflict with a keyframe identifier.
|
| - StringBuilder id;
|
| - id.appendLiteral("-|transition");
|
| - id.appendNumber(static_cast<int>(property));
|
| - id.append('-');
|
| - return id.toString();
|
| -}
|
| -
|
| void GraphicsLayer::setZPosition(float position)
|
| {
|
| m_zPosition = position;
|
| @@ -977,39 +963,24 @@ void GraphicsLayer::setContentsToMedia(WebLayer* layer)
|
| setContentsTo(ContentsLayerForVideo, layer);
|
| }
|
|
|
| -bool GraphicsLayer::addAnimation(const KeyframeValueList& values, const IntSize& boxSize, const CSSAnimationData* animation, const String& animationName, double timeOffset)
|
| +bool GraphicsLayer::addAnimation(WebAnimation* animation)
|
| {
|
| + ASSERT(animation);
|
| platformLayer()->setAnimationDelegate(this);
|
|
|
| - int animationId = 0;
|
| -
|
| - if (m_animationIdMap.contains(animationName))
|
| - animationId = m_animationIdMap.get(animationName);
|
| -
|
| - OwnPtr<WebAnimation> toAdd(createWebAnimation(values, animation, animationId, timeOffset, boxSize));
|
| -
|
| - if (toAdd) {
|
| - animationId = toAdd->id();
|
| - m_animationIdMap.set(animationName, animationId);
|
| -
|
| - // Remove any existing animations with the same animation id and target property.
|
| - platformLayer()->removeAnimation(animationId, toAdd->targetProperty());
|
| - return platformLayer()->addAnimation(toAdd.get());
|
| - }
|
| -
|
| - return false;
|
| + // Remove any existing animations with the same animation id and target property.
|
| + platformLayer()->removeAnimation(animation->id(), animation->targetProperty());
|
| + return platformLayer()->addAnimation(animation);
|
| }
|
|
|
| -void GraphicsLayer::pauseAnimation(const String& animationName, double timeOffset)
|
| +void GraphicsLayer::pauseAnimation(int animationId, double timeOffset)
|
| {
|
| - if (m_animationIdMap.contains(animationName))
|
| - platformLayer()->pauseAnimation(m_animationIdMap.get(animationName), timeOffset);
|
| + platformLayer()->pauseAnimation(animationId, timeOffset);
|
| }
|
|
|
| -void GraphicsLayer::removeAnimation(const String& animationName)
|
| +void GraphicsLayer::removeAnimation(int animationId)
|
| {
|
| - if (m_animationIdMap.contains(animationName))
|
| - platformLayer()->removeAnimation(m_animationIdMap.get(animationName));
|
| + platformLayer()->removeAnimation(animationId);
|
| }
|
|
|
| void GraphicsLayer::suspendAnimations(double wallClockTime)
|
|
|