Unreviewed, rolling out r100834.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Nov 2011 20:15:12 +0000 (20:15 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Nov 2011 20:15:12 +0000 (20:15 +0000)
http://trac.webkit.org/changeset/100834
https://bugs.webkit.org/show_bug.cgi?id=72806

this patch makes Qt run-webkit-test exit before finishing
(Requested by igoroliveira on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-11-19

Source/WebCore:

* platform/graphics/texmap/TextureMapperNode.cpp:
* platform/graphics/texmap/TextureMapperNode.h:

Source/WebKit2:

* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
* Shared/WebCoreArgumentCoders.h:
* Shared/WebLayerTreeInfo.cpp:
(WebKit::WebLayerInfo::encode):
(WebKit::WebLayerInfo::decode):
* Shared/WebLayerTreeInfo.h:
* UIProcess/LayerTreeHostProxy.h:
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::LayerTreeHostProxy):
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
(WebKit::LayerTreeHostProxy::syncLayerParameters):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::addAnimation):
(WebCore::WebGraphicsLayer::pauseAnimation):
(WebCore::WebGraphicsLayer::removeAnimation):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100859 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperNode.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
Source/WebKit2/Shared/WebCoreArgumentCoders.h
Source/WebKit2/Shared/WebLayerTreeInfo.cpp
Source/WebKit2/Shared/WebLayerTreeInfo.h
Source/WebKit2/UIProcess/LayerTreeHostProxy.h
Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp

index 3f4142365c112ac1e5454eec190a6f2e35803f59..c3f81c02d1a015fda03b80894c31bcfbc8605478 100644 (file)
@@ -1,3 +1,15 @@
+2011-11-19  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r100834.
+        http://trac.webkit.org/changeset/100834
+        https://bugs.webkit.org/show_bug.cgi?id=72806
+
+        this patch makes Qt run-webkit-test exit before finishing
+        (Requested by igoroliveira on #webkit).
+
+        * platform/graphics/texmap/TextureMapperNode.cpp:
+        * platform/graphics/texmap/TextureMapperNode.h:
+
 2011-11-19  Huang Dongsung  <luxtella@company100.net>
 
         Remove WebCore/ForwardingHeaders/runtime/JSObjectWithGlobalObject.h because
index 0af8d734fa3dbb2acf40a56442ce5722689b3f3b..ab597031f0dd7825a42a7c83e2478eb7d090ca94 100644 (file)
@@ -984,16 +984,6 @@ void TextureMapperNode::syncAnimations(GraphicsLayerTextureMapper* layer)
     }
 }
 
-void TextureMapperNode::syncAnimationsRecursively()
-{
-    syncAnimations(0);
-
-    computeAllTransforms();
-
-    for (int i = m_children.size() - 1; i >= 0; --i)
-        m_children[i]->syncAnimationsRecursively();
-}
-
 void TextureMapperNode::syncCompositingState(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper, int options)
 {
     if (graphicsLayer && !(options & ComputationsOnly)) {
index eb9c692e5b8ae1937f4d6565dbab0cf8db10d926..4a4fcfff13b0bbc5b33e2201e09527de3eac0330 100644 (file)
@@ -141,7 +141,6 @@ public:
 
     void syncCompositingState(GraphicsLayerTextureMapper*, int syncOptions = 0);
     void syncCompositingState(GraphicsLayerTextureMapper*, TextureMapper*, int syncOptions = 0);
-    void syncAnimationsRecursively();
     IntSize size() const { return IntSize(m_size.width(), m_size.height()); }
     void setTransform(const TransformationMatrix&);
     void setOpacity(float value) { m_opacity = value; }
index 344e7bb3c09bb6deabc5acbffe563ccc7ce52592..fc9e5573a8c2b52b09cb3aaa7db4c8ee2d8f9710 100644 (file)
@@ -1,3 +1,31 @@
+2011-11-19  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r100834.
+        http://trac.webkit.org/changeset/100834
+        https://bugs.webkit.org/show_bug.cgi?id=72806
+
+        this patch makes Qt run-webkit-test exit before finishing
+        (Requested by igoroliveira on #webkit).
+
+        * Shared/WebCoreArgumentCoders.cpp:
+        (CoreIPC::::encode):
+        (CoreIPC::::decode):
+        * Shared/WebCoreArgumentCoders.h:
+        * Shared/WebLayerTreeInfo.cpp:
+        (WebKit::WebLayerInfo::encode):
+        (WebKit::WebLayerInfo::decode):
+        * Shared/WebLayerTreeInfo.h:
+        * UIProcess/LayerTreeHostProxy.h:
+        * UIProcess/qt/LayerTreeHostProxyQt.cpp:
+        (WebKit::LayerTreeHostProxy::LayerTreeHostProxy):
+        (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
+        (WebKit::LayerTreeHostProxy::syncLayerParameters):
+        * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
+        (WebCore::WebGraphicsLayer::addAnimation):
+        (WebCore::WebGraphicsLayer::pauseAnimation):
+        (WebCore::WebGraphicsLayer::removeAnimation):
+        (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
+
 2011-11-18  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r100826.
index 73ae86abebd0bd9e24c988815123eaed8d95aab5..05a629fa322b59ff434714c5acb0a753884f88dd 100644 (file)
@@ -647,6 +647,7 @@ bool ArgumentCoder<Length>::decode(ArgumentDecoder* decoder, Length& length)
     return SimpleArgumentCoder<Length>::decode(decoder, length);
 }
 
+
 void ArgumentCoder<TransformationMatrix>::encode(ArgumentEncoder* encoder, const TransformationMatrix& transformationMatrix)
 {
     SimpleArgumentCoder<TransformationMatrix>::encode(encoder, transformationMatrix);
@@ -1061,18 +1062,18 @@ static void encodeBoolAndEnumValue(ArgumentEncoder* encoder, bool isSet, T value
         encoder->encodeEnum(value);
 }
 
-void ArgumentCoder<RefPtr<Animation> >::encode(ArgumentEncoder* encoder, const RefPtr<Animation>& animation)
+void ArgumentCoder<Animation>::encode(ArgumentEncoder* encoder, const Animation& animation)
 {
-    encodeBoolAndValue(encoder, animation->isDelaySet(), animation->delay());
-    encodeBoolAndEnumValue(encoder, animation->isDirectionSet(), animation->direction());
-    encodeBoolAndValue(encoder, animation->isDurationSet(), animation->duration());
-    encodeBoolAndValue(encoder, animation->isFillModeSet(), animation->fillMode());
-    encodeBoolAndValue(encoder, animation->isIterationCountSet(), animation->iterationCount());
-    encodeBoolAndValue(encoder, animation->isNameSet(), animation->name());
-    encodeBoolAndEnumValue(encoder, animation->isPlayStateSet(), animation->playState());
-    encodeBoolAndValue(encoder, animation->isPropertySet(), animation->property());
-    encodeBoolAndValue<RefPtr<TimingFunction> >(encoder, animation->isTimingFunctionSet(), animation->timingFunction());
-    encoder->encodeBool(animation->isNoneAnimation());
+    encodeBoolAndValue(encoder, animation.isDelaySet(), animation.delay());
+    encodeBoolAndEnumValue(encoder, animation.isDirectionSet(), animation.direction());
+    encodeBoolAndValue(encoder, animation.isDurationSet(), animation.duration());
+    encodeBoolAndValue(encoder, animation.isFillModeSet(), animation.fillMode());
+    encodeBoolAndValue(encoder, animation.isIterationCountSet(), animation.iterationCount());
+    encodeBoolAndValue(encoder, animation.isNameSet(), animation.name());
+    encodeBoolAndEnumValue(encoder, animation.isPlayStateSet(), animation.playState());
+    encodeBoolAndValue(encoder, animation.isPropertySet(), animation.property());
+    encodeBoolAndValue<RefPtr<TimingFunction> >(encoder, animation.isTimingFunctionSet(), animation.timingFunction());
+    encoder->encodeBool(animation.isNoneAnimation());
 }
 
 
@@ -1098,7 +1099,7 @@ static bool decodeBoolAndEnumValue(ArgumentDecoder* decoder, bool& isSet, T& val
     return decoder->decodeEnum(value);
 }
 
-bool ArgumentCoder<RefPtr<Animation> >::decode(ArgumentDecoder* decoder, RefPtr<Animation>& animation)
+bool ArgumentCoder<Animation>::decode(ArgumentDecoder* decoder, Animation& animation)
 {
     bool isDelaySet, isDirectionSet, isDurationSet, isFillModeSet, isIterationCountSet, isNameSet, isPlayStateSet, isPropertySet, isTimingFunctionSet;
     int property, iterationCount, fillMode;
@@ -1106,6 +1107,8 @@ bool ArgumentCoder<RefPtr<Animation> >::decode(ArgumentDecoder* decoder, RefPtr<
     RefPtr<TimingFunction> timingFunction;
     String name;
 
+    animation.clearAll();
+
     double delay;
     if (!decodeBoolAndValue(decoder, isDelaySet, delay))
         return false;
@@ -1130,27 +1133,24 @@ bool ArgumentCoder<RefPtr<Animation> >::decode(ArgumentDecoder* decoder, RefPtr<
     if (!decodeBoolAndValue<RefPtr<TimingFunction> >(decoder, isTimingFunctionSet, timingFunction))
         return false;
 
-    animation = Animation::create();
-    animation->clearAll();
-
     if (isDelaySet)
-        animation->setDelay(delay);
+        animation.setDelay(delay);
     if (isDirectionSet)
-        animation->setDirection(direction);
+        animation.setDirection(direction);
     if (isDurationSet)
-        animation->setDuration(duration);
+        animation.setDuration(duration);
     if (isFillModeSet)
-        animation->setFillMode(fillMode);
+        animation.setFillMode(fillMode);
     if (isIterationCountSet)
-        animation->setIterationCount(iterationCount);
+        animation.setIterationCount(iterationCount);
     if (isNameSet)
-        animation->setName(name);
+        animation.setName(name);
     if (isPlayStateSet)
-        animation->setPlayState(playState);
+        animation.setPlayState(playState);
     if (isPropertySet)
-        animation->setProperty(property);
+        animation.setProperty(property);
     if (isTimingFunctionSet)
-        animation->setTimingFunction(timingFunction);
+        animation.setTimingFunction(timingFunction);
 
     return true;
 }
index 055041f9506cce0eb579c5e9a81a81dfd640ac7f..17e0d90c63ac6cba689c95877140ca150b05dee6 100644 (file)
@@ -288,9 +288,9 @@ template<> struct ArgumentCoder<WebCore::TransformOperations> {
     static bool decode(ArgumentDecoder*, WebCore::TransformOperations&);
 };
 
-template<> struct ArgumentCoder<RefPtr<WebCore::Animation> > {
-    static void encode(ArgumentEncoder*, const RefPtr<WebCore::Animation>&);
-    static bool decode(ArgumentDecoder*, RefPtr<WebCore::Animation>&);
+template<> struct ArgumentCoder<WebCore::Animation> {
+    static void encode(ArgumentEncoder*, const WebCore::Animation&);
+    static bool decode(ArgumentDecoder*, WebCore::Animation&);
 };
 #endif
 
index a579515f732450802e7cfcd9f6ce1c841b33b6b0..edb62a250086427077843d9a171bd61168650284 100644 (file)
@@ -35,7 +35,7 @@ void WebLayerInfo::encode(CoreIPC::ArgumentEncoder* encoder) const
 {
     // We have to divide it to several lines, because CoreIPC::In/Out takes a maximum of 10 arguments.
     encoder->encode(CoreIPC::In(id, name, parent, children, flags, replica, mask, imageBackingStoreID));
-    encoder->encode(CoreIPC::In(pos, size, transform, opacity, anchorPoint, childrenTransform, contentsRect, animations));
+    encoder->encode(CoreIPC::In(pos, size, transform, opacity, anchorPoint, childrenTransform, contentsRect));
 }
 
 bool WebLayerInfo::decode(CoreIPC::ArgumentDecoder* decoder, WebLayerInfo& info)
@@ -43,9 +43,8 @@ bool WebLayerInfo::decode(CoreIPC::ArgumentDecoder* decoder, WebLayerInfo& info)
     // We have to divide it to several lines, because CoreIPC::In/Out takes a maximum of 10 arguments.
     if (!decoder->decode(CoreIPC::Out(info.id, info.name, info.parent, info.children, info.flags, info.replica, info.mask, info.imageBackingStoreID)))
         return false;
-    if (!decoder->decode(CoreIPC::Out(info.pos, info.size, info.transform, info.opacity, info.anchorPoint, info.childrenTransform, info.contentsRect, info.animations)))
+    if (!decoder->decode(CoreIPC::Out(info.pos, info.size, info.transform, info.opacity, info.anchorPoint, info.childrenTransform, info.contentsRect)))
         return false;
-
     return true;
 }
 
@@ -69,24 +68,5 @@ bool WebLayerUpdateInfo::decode(CoreIPC::ArgumentDecoder* decoder, WebLayerUpdat
     return decoder->decode(CoreIPC::Out(info.layerID, info.rect, info.bitmapHandle));
 }
 
-void WebLayerAnimation::encode(CoreIPC::ArgumentEncoder* encoder) const
-{
-    encoder->encodeEnum(operation);
-    encoder->encode(keyframeList);
-    encoder->encode(CoreIPC::In(name, startTime, boxSize, animation, keyframeList));
-}
-
-bool WebLayerAnimation::decode(CoreIPC::ArgumentDecoder* decoder, WebLayerAnimation& info)
-{
-    if (!decoder->decodeEnum(info.operation))
-        return false;
-    if (!decoder->decode(info.keyframeList))
-        return false;
-    if (!decoder->decode(CoreIPC::Out(info.name, info.startTime, info.boxSize, info.animation)))
-        return false;
-
-    return true;
-}
-
 }
 #endif
index 56a4f6414c4add3dc68e911f34bf021b0581da43..25003e743c61c33c0292203ef76f3f46e69d27d6 100644 (file)
@@ -49,25 +49,6 @@ struct WebLayerUpdateInfo {
     static bool decode(CoreIPC::ArgumentDecoder*, WebLayerUpdateInfo&);
 };
 
-struct WebLayerAnimation {
-    WebLayerAnimation() : keyframeList(AnimatedPropertyInvalid) { }
-    WebLayerAnimation(const KeyframeValueList& valueList) 
-        : keyframeList(valueList) { }
-    String name;
-    enum Operation {
-        AddAnimation,
-        RemoveAnimation,
-        PauseAnimation
-    } operation;
-    IntSize boxSize;
-    RefPtr<Animation> animation;
-    KeyframeValueList keyframeList;
-    double startTime;
-
-    void encode(CoreIPC::ArgumentEncoder*) const;
-    static bool decode(CoreIPC::ArgumentDecoder*, WebLayerAnimation&);
-};
-
 struct WebLayerInfo {
     String name;
     WebLayerID id;
@@ -98,7 +79,6 @@ struct WebLayerInfo {
         unsigned int flags;
     };
     Vector<WebLayerID> children;
-    Vector<WebLayerAnimation> animations;
     RefPtr<ShareableBitmap> imageBackingStore;
 
     void encode(CoreIPC::ArgumentEncoder*) const;
index 9ce0dd915966d3aec7fd792f053f512eb40dadff..45e8df6635cdcec90446a3de0232ba483d6ebd12 100644 (file)
@@ -125,11 +125,6 @@ protected:
     OwnPtr<GraphicsLayer> m_rootLayer;
     Vector<WebLayerID> m_layersToDelete;
 
-#if PLATFORM(QT)
-    void didFireViewportUpdateTimer(Timer<LayerTreeHostProxy>*);
-    Timer<LayerTreeHostProxy> m_viewportUpdateTimer;
-#endif
-
     LayerMap m_layers;
     WebLayerID m_rootLayerID;
     int m_id;
index 9cb198996a2755a08fc52cbd7f28311f2413f1a1..0c036e4f3acf313aa76dc7483967f6c5d214b3a9 100644 (file)
@@ -154,7 +154,6 @@ PassOwnPtr<GraphicsLayer> LayerTreeHostProxy::createLayer(WebLayerID layerID)
 LayerTreeHostProxy::LayerTreeHostProxy(DrawingAreaProxy* drawingAreaProxy)
     : m_animationTimer(RunLoop::main(), this, &LayerTreeHostProxy::updateViewport)
     , m_drawingAreaProxy(drawingAreaProxy)
-    , m_viewportUpdateTimer(this, &LayerTreeHostProxy::didFireViewportUpdateTimer)
     , m_rootLayerID(0)
 {
 }
@@ -209,15 +208,8 @@ void LayerTreeHostProxy::paintToCurrentGLContext(const TransformationMatrix& mat
 
     m_textureMapper->endPainting();
 
-    if (node->descendantsOrSelfHaveRunningAnimations()) {
-        node->syncAnimationsRecursively();
-        m_viewportUpdateTimer.startOneShot(0);
-    }
-}
-
-void LayerTreeHostProxy::didFireViewportUpdateTimer(Timer<LayerTreeHostProxy>*)
-{
-    updateViewport();
+    if (node->descendantsOrSelfHaveRunningAnimations())
+        updateViewport();
 }
 
 void LayerTreeHostProxy::updateViewport()
@@ -280,26 +272,6 @@ void LayerTreeHostProxy::syncLayerParameters(const WebLayerInfo& layerInfo)
     }
     layer->setChildren(children);
 
-    for (size_t i = 0; i < layerInfo.animations.size(); ++i) {
-        const WebKit::WebLayerAnimation anim = layerInfo.animations[i];
-
-        switch (anim.operation) {
-        case WebKit::WebLayerAnimation::AddAnimation: {
-            const IntSize boxSize = anim.boxSize;
-            double offset = WTF::currentTime() - anim.startTime;
-            layer->addAnimation(anim.keyframeList, boxSize, anim.animation.get(), anim.name, offset);
-            break;
-        }
-        case WebKit::WebLayerAnimation::RemoveAnimation:
-            layer->removeAnimation(anim.name);
-            break;
-        case WebKit::WebLayerAnimation::PauseAnimation:
-            double offset = WTF::currentTime() - anim.startTime;
-            layer->pauseAnimation(anim.name, offset);
-            break;
-        }
-    }
-
     if (layerInfo.isRootLayer && m_rootLayerID != id)
         setRootLayerID(id);
 }
index 58f7cdced67dfc5c3f9433db61f9536031b8e909..70843244fb99a497f17476e948a0d82227d37d21 100644 (file)
@@ -280,40 +280,15 @@ void WebGraphicsLayer::notifyAnimationStarted(double time)
 // We put these stub implementations here for when we implement accelerated cross-process animations.
 bool WebGraphicsLayer::addAnimation(const KeyframeValueList& valueList, const IntSize& boxSize, const Animation* anim, const String& keyframesName, double timeOffset)
 {
-    if (!anim || anim->isEmptyOrZeroDuration() || valueList.size() < 2 || (valueList.property() != AnimatedPropertyWebkitTransform && valueList.property() != AnimatedPropertyOpacity))
-        return false;
-
-    WebLayerAnimation webAnimation(valueList);
-    webAnimation.name = keyframesName;
-    webAnimation.operation = WebLayerAnimation::AddAnimation;
-    webAnimation.boxSize = boxSize;
-    webAnimation.animation = Animation::create(anim);
-    webAnimation.startTime = WTF::currentTime() - timeOffset;
-    m_layerInfo.animations.append(webAnimation);
-
-    m_hasPendingAnimations = true;
-    notifyChange();
-
-    return true;
+    return false;
 }
 
 void WebGraphicsLayer::pauseAnimation(const String& animationName, double timeOffset)
 {
-    WebLayerAnimation animation;
-    animation.name = animationName;
-    animation.operation = WebLayerAnimation::PauseAnimation;
-    animation.startTime = WTF::currentTime() - timeOffset;
-    m_layerInfo.animations.append(animation);
-    notifyChange();
 }
 
 void WebGraphicsLayer::removeAnimation(const String& animationName)
 {
-    WebLayerAnimation animation;
-    animation.name = animationName;
-    animation.operation = WebLayerAnimation::RemoveAnimation;
-    m_layerInfo.animations.append(animation);
-    notifyChange();
 }
 
 void WebGraphicsLayer::setContentsNeedsDisplay()
@@ -427,7 +402,6 @@ void WebGraphicsLayer::syncCompositingStateForThisLayerOnly()
     m_layerInfo.imageIsUpdated = false;
     if (m_hasPendingAnimations)
         notifyAnimationStarted(WTF::currentTime());
-    m_layerInfo.animations.clear();
     m_hasPendingAnimations = false;
 }