summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/WebLayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/chromium/src/WebLayer.cpp')
-rw-r--r--Source/WebKit/chromium/src/WebLayer.cpp70
1 files changed, 67 insertions, 3 deletions
diff --git a/Source/WebKit/chromium/src/WebLayer.cpp b/Source/WebKit/chromium/src/WebLayer.cpp
index 5b8d55cf4..d77c25eb9 100644
--- a/Source/WebKit/chromium/src/WebLayer.cpp
+++ b/Source/WebKit/chromium/src/WebLayer.cpp
@@ -24,12 +24,10 @@
*/
#include "config.h"
-#include "platform/WebLayer.h"
+#include <public/WebLayer.h>
-#include "Color.h"
#include "LayerChromium.h"
#include "SkMatrix44.h"
-#include "TransformationMatrix.h"
#include "WebLayerImpl.h"
#include <public/WebFilterOperations.h>
#include <public/WebFloatPoint.h>
@@ -144,6 +142,14 @@ void WebLayer::replaceChild(const WebLayer& reference, const WebLayer& newLayer)
m_private->replaceChild(ref.unwrap<LayerChromium>(), newLayer);
}
+void WebLayer::setChildren(const WebVector<WebLayer>& webChildren)
+{
+ Vector<RefPtr<LayerChromium> > children(webChildren.size());
+ for (size_t i = 0; i < webChildren.size(); ++i)
+ children[i] = webChildren[i].unwrap<LayerChromium>();
+ m_private->setChildren(children);
+}
+
void WebLayer::removeFromParent()
{
m_private->removeFromParent();
@@ -205,6 +211,12 @@ WebLayer WebLayer::maskLayer() const
return WebLayer(m_private->maskLayer());
}
+void WebLayer::setReplicaLayer(const WebLayer& replicaLayer)
+{
+ WebLayer ref = replicaLayer;
+ m_private->setReplicaLayer(ref.unwrap<LayerChromium>());
+}
+
void WebLayer::setOpacity(float opacity)
{
m_private->setOpacity(opacity);
@@ -310,6 +322,53 @@ void WebLayer::setDebugBorderWidth(float width)
m_private->setDebugBorderWidth(width);
}
+void WebLayer::setDebugName(WebString name)
+{
+ m_private->setDebugName(name);
+}
+
+void WebLayer::setAnimationDelegate(WebAnimationDelegate* delegate)
+{
+ m_private->setLayerAnimationDelegate(delegate);
+}
+
+bool WebLayer::addAnimation(const WebAnimation& animation)
+{
+ return m_private->addAnimation(animation);
+}
+
+void WebLayer::removeAnimation(int animationId)
+{
+ m_private->removeAnimation(animationId);
+}
+
+void WebLayer::removeAnimation(int animationId, WebAnimation::TargetProperty targetProperty)
+{
+ m_private->layerAnimationController()->removeAnimation(animationId, static_cast<CCActiveAnimation::TargetProperty>(targetProperty));
+}
+
+void WebLayer::pauseAnimation(int animationId, double timeOffset)
+{
+ m_private->pauseAnimation(animationId, timeOffset);
+}
+
+void WebLayer::suspendAnimations(double monotonicTime)
+{
+ m_private->suspendAnimations(monotonicTime);
+}
+
+void WebLayer::resumeAnimations(double monotonicTime)
+{
+ m_private->resumeAnimations(monotonicTime);
+}
+
+void WebLayer::transferAnimationsTo(WebLayer* other)
+{
+ ASSERT(other);
+ if (other)
+ other->m_private->setLayerAnimationController(m_private->releaseLayerAnimationController());
+}
+
void WebLayer::setAlwaysReserveTextures(bool reserve)
{
m_private->setAlwaysReserveTextures(reserve);
@@ -320,6 +379,11 @@ void WebLayer::setForceRenderSurface(bool forceRenderSurface)
m_private->setForceRenderSurface(forceRenderSurface);
}
+void WebLayer::clearRenderSurface()
+{
+ m_private->clearRenderSurface();
+}
+
WebLayer::WebLayer(const PassRefPtr<LayerChromium>& node)
: m_private(node)
{