Changeset 100859 in webkit


Ignore:
Timestamp:
Nov 19, 2011 12:15:12 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

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).

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):

Location:
trunk/Source
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r100858 r100859  
     12011-11-19  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r100834.
     4        http://trac.webkit.org/changeset/100834
     5        https://bugs.webkit.org/show_bug.cgi?id=72806
     6
     7        this patch makes Qt run-webkit-test exit before finishing
     8        (Requested by igoroliveira on #webkit).
     9
     10        * platform/graphics/texmap/TextureMapperNode.cpp:
     11        * platform/graphics/texmap/TextureMapperNode.h:
     12
    1132011-11-19  Huang Dongsung  <luxtella@company100.net>
    214
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp

    r100834 r100859  
    985985}
    986986
    987 void TextureMapperNode::syncAnimationsRecursively()
    988 {
    989     syncAnimations(0);
    990 
    991     computeAllTransforms();
    992 
    993     for (int i = m_children.size() - 1; i >= 0; --i)
    994         m_children[i]->syncAnimationsRecursively();
    995 }
    996 
    997987void TextureMapperNode::syncCompositingState(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper, int options)
    998988{
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperNode.h

    r100834 r100859  
    142142    void syncCompositingState(GraphicsLayerTextureMapper*, int syncOptions = 0);
    143143    void syncCompositingState(GraphicsLayerTextureMapper*, TextureMapper*, int syncOptions = 0);
    144     void syncAnimationsRecursively();
    145144    IntSize size() const { return IntSize(m_size.width(), m_size.height()); }
    146145    void setTransform(const TransformationMatrix&);
  • trunk/Source/WebKit2/ChangeLog

    r100842 r100859  
     12011-11-19  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r100834.
     4        http://trac.webkit.org/changeset/100834
     5        https://bugs.webkit.org/show_bug.cgi?id=72806
     6
     7        this patch makes Qt run-webkit-test exit before finishing
     8        (Requested by igoroliveira on #webkit).
     9
     10        * Shared/WebCoreArgumentCoders.cpp:
     11        (CoreIPC::::encode):
     12        (CoreIPC::::decode):
     13        * Shared/WebCoreArgumentCoders.h:
     14        * Shared/WebLayerTreeInfo.cpp:
     15        (WebKit::WebLayerInfo::encode):
     16        (WebKit::WebLayerInfo::decode):
     17        * Shared/WebLayerTreeInfo.h:
     18        * UIProcess/LayerTreeHostProxy.h:
     19        * UIProcess/qt/LayerTreeHostProxyQt.cpp:
     20        (WebKit::LayerTreeHostProxy::LayerTreeHostProxy):
     21        (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
     22        (WebKit::LayerTreeHostProxy::syncLayerParameters):
     23        * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
     24        (WebCore::WebGraphicsLayer::addAnimation):
     25        (WebCore::WebGraphicsLayer::pauseAnimation):
     26        (WebCore::WebGraphicsLayer::removeAnimation):
     27        (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
     28
    1292011-11-18  Sheriff Bot  <webkit.review.bot@gmail.com>
    230
  • trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp

    r100834 r100859  
    648648}
    649649
     650
    650651void ArgumentCoder<TransformationMatrix>::encode(ArgumentEncoder* encoder, const TransformationMatrix& transformationMatrix)
    651652{
     
    10621063}
    10631064
    1064 void ArgumentCoder<RefPtr<Animation> >::encode(ArgumentEncoder* encoder, const RefPtr<Animation>& animation)
    1065 {
    1066     encodeBoolAndValue(encoder, animation->isDelaySet(), animation->delay());
    1067     encodeBoolAndEnumValue(encoder, animation->isDirectionSet(), animation->direction());
    1068     encodeBoolAndValue(encoder, animation->isDurationSet(), animation->duration());
    1069     encodeBoolAndValue(encoder, animation->isFillModeSet(), animation->fillMode());
    1070     encodeBoolAndValue(encoder, animation->isIterationCountSet(), animation->iterationCount());
    1071     encodeBoolAndValue(encoder, animation->isNameSet(), animation->name());
    1072     encodeBoolAndEnumValue(encoder, animation->isPlayStateSet(), animation->playState());
    1073     encodeBoolAndValue(encoder, animation->isPropertySet(), animation->property());
    1074     encodeBoolAndValue<RefPtr<TimingFunction> >(encoder, animation->isTimingFunctionSet(), animation->timingFunction());
    1075     encoder->encodeBool(animation->isNoneAnimation());
     1065void ArgumentCoder<Animation>::encode(ArgumentEncoder* encoder, const Animation& animation)
     1066{
     1067    encodeBoolAndValue(encoder, animation.isDelaySet(), animation.delay());
     1068    encodeBoolAndEnumValue(encoder, animation.isDirectionSet(), animation.direction());
     1069    encodeBoolAndValue(encoder, animation.isDurationSet(), animation.duration());
     1070    encodeBoolAndValue(encoder, animation.isFillModeSet(), animation.fillMode());
     1071    encodeBoolAndValue(encoder, animation.isIterationCountSet(), animation.iterationCount());
     1072    encodeBoolAndValue(encoder, animation.isNameSet(), animation.name());
     1073    encodeBoolAndEnumValue(encoder, animation.isPlayStateSet(), animation.playState());
     1074    encodeBoolAndValue(encoder, animation.isPropertySet(), animation.property());
     1075    encodeBoolAndValue<RefPtr<TimingFunction> >(encoder, animation.isTimingFunctionSet(), animation.timingFunction());
     1076    encoder->encodeBool(animation.isNoneAnimation());
    10761077}
    10771078
     
    10991100}
    11001101
    1101 bool ArgumentCoder<RefPtr<Animation> >::decode(ArgumentDecoder* decoder, RefPtr<Animation>& animation)
     1102bool ArgumentCoder<Animation>::decode(ArgumentDecoder* decoder, Animation& animation)
    11021103{
    11031104    bool isDelaySet, isDirectionSet, isDurationSet, isFillModeSet, isIterationCountSet, isNameSet, isPlayStateSet, isPropertySet, isTimingFunctionSet;
     
    11071108    String name;
    11081109
     1110    animation.clearAll();
     1111
    11091112    double delay;
    11101113    if (!decodeBoolAndValue(decoder, isDelaySet, delay))
     
    11311134        return false;
    11321135
    1133     animation = Animation::create();
    1134     animation->clearAll();
    1135 
    11361136    if (isDelaySet)
    1137         animation->setDelay(delay);
     1137        animation.setDelay(delay);
    11381138    if (isDirectionSet)
    1139         animation->setDirection(direction);
     1139        animation.setDirection(direction);
    11401140    if (isDurationSet)
    1141         animation->setDuration(duration);
     1141        animation.setDuration(duration);
    11421142    if (isFillModeSet)
    1143         animation->setFillMode(fillMode);
     1143        animation.setFillMode(fillMode);
    11441144    if (isIterationCountSet)
    1145         animation->setIterationCount(iterationCount);
     1145        animation.setIterationCount(iterationCount);
    11461146    if (isNameSet)
    1147         animation->setName(name);
     1147        animation.setName(name);
    11481148    if (isPlayStateSet)
    1149         animation->setPlayState(playState);
     1149        animation.setPlayState(playState);
    11501150    if (isPropertySet)
    1151         animation->setProperty(property);
     1151        animation.setProperty(property);
    11521152    if (isTimingFunctionSet)
    1153         animation->setTimingFunction(timingFunction);
     1153        animation.setTimingFunction(timingFunction);
    11541154
    11551155    return true;
  • trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h

    r100834 r100859  
    289289};
    290290
    291 template<> struct ArgumentCoder<RefPtr<WebCore::Animation> > {
    292     static void encode(ArgumentEncoder*, const RefPtr<WebCore::Animation>&);
    293     static bool decode(ArgumentDecoder*, RefPtr<WebCore::Animation>&);
     291template<> struct ArgumentCoder<WebCore::Animation> {
     292    static void encode(ArgumentEncoder*, const WebCore::Animation&);
     293    static bool decode(ArgumentDecoder*, WebCore::Animation&);
    294294};
    295295#endif
  • trunk/Source/WebKit2/Shared/WebLayerTreeInfo.cpp

    r100834 r100859  
    3636    // We have to divide it to several lines, because CoreIPC::In/Out takes a maximum of 10 arguments.
    3737    encoder->encode(CoreIPC::In(id, name, parent, children, flags, replica, mask, imageBackingStoreID));
    38     encoder->encode(CoreIPC::In(pos, size, transform, opacity, anchorPoint, childrenTransform, contentsRect, animations));
     38    encoder->encode(CoreIPC::In(pos, size, transform, opacity, anchorPoint, childrenTransform, contentsRect));
    3939}
    4040
     
    4444    if (!decoder->decode(CoreIPC::Out(info.id, info.name, info.parent, info.children, info.flags, info.replica, info.mask, info.imageBackingStoreID)))
    4545        return false;
    46     if (!decoder->decode(CoreIPC::Out(info.pos, info.size, info.transform, info.opacity, info.anchorPoint, info.childrenTransform, info.contentsRect, info.animations)))
     46    if (!decoder->decode(CoreIPC::Out(info.pos, info.size, info.transform, info.opacity, info.anchorPoint, info.childrenTransform, info.contentsRect)))
    4747        return false;
    48 
    4948    return true;
    5049}
     
    7069}
    7170
    72 void WebLayerAnimation::encode(CoreIPC::ArgumentEncoder* encoder) const
    73 {
    74     encoder->encodeEnum(operation);
    75     encoder->encode(keyframeList);
    76     encoder->encode(CoreIPC::In(name, startTime, boxSize, animation, keyframeList));
    77 }
    78 
    79 bool WebLayerAnimation::decode(CoreIPC::ArgumentDecoder* decoder, WebLayerAnimation& info)
    80 {
    81     if (!decoder->decodeEnum(info.operation))
    82         return false;
    83     if (!decoder->decode(info.keyframeList))
    84         return false;
    85     if (!decoder->decode(CoreIPC::Out(info.name, info.startTime, info.boxSize, info.animation)))
    86         return false;
    87 
    88     return true;
    89 }
    90 
    9171}
    9272#endif
  • trunk/Source/WebKit2/Shared/WebLayerTreeInfo.h

    r100834 r100859  
    5050};
    5151
    52 struct WebLayerAnimation {
    53     WebLayerAnimation() : keyframeList(AnimatedPropertyInvalid) { }
    54     WebLayerAnimation(const KeyframeValueList& valueList)
    55         : keyframeList(valueList) { }
    56     String name;
    57     enum Operation {
    58         AddAnimation,
    59         RemoveAnimation,
    60         PauseAnimation
    61     } operation;
    62     IntSize boxSize;
    63     RefPtr<Animation> animation;
    64     KeyframeValueList keyframeList;
    65     double startTime;
    66 
    67     void encode(CoreIPC::ArgumentEncoder*) const;
    68     static bool decode(CoreIPC::ArgumentDecoder*, WebLayerAnimation&);
    69 };
    70 
    7152struct WebLayerInfo {
    7253    String name;
     
    9980    };
    10081    Vector<WebLayerID> children;
    101     Vector<WebLayerAnimation> animations;
    10282    RefPtr<ShareableBitmap> imageBackingStore;
    10383
  • trunk/Source/WebKit2/UIProcess/LayerTreeHostProxy.h

    r100834 r100859  
    126126    Vector<WebLayerID> m_layersToDelete;
    127127
    128 #if PLATFORM(QT)
    129     void didFireViewportUpdateTimer(Timer<LayerTreeHostProxy>*);
    130     Timer<LayerTreeHostProxy> m_viewportUpdateTimer;
    131 #endif
    132 
    133128    LayerMap m_layers;
    134129    WebLayerID m_rootLayerID;
  • trunk/Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp

    r100834 r100859  
    155155    : m_animationTimer(RunLoop::main(), this, &LayerTreeHostProxy::updateViewport)
    156156    , m_drawingAreaProxy(drawingAreaProxy)
    157     , m_viewportUpdateTimer(this, &LayerTreeHostProxy::didFireViewportUpdateTimer)
    158157    , m_rootLayerID(0)
    159158{
     
    210209    m_textureMapper->endPainting();
    211210
    212     if (node->descendantsOrSelfHaveRunningAnimations()) {
    213         node->syncAnimationsRecursively();
    214         m_viewportUpdateTimer.startOneShot(0);
    215     }
    216 }
    217 
    218 void LayerTreeHostProxy::didFireViewportUpdateTimer(Timer<LayerTreeHostProxy>*)
    219 {
    220     updateViewport();
     211    if (node->descendantsOrSelfHaveRunningAnimations())
     212        updateViewport();
    221213}
    222214
     
    280272    }
    281273    layer->setChildren(children);
    282 
    283     for (size_t i = 0; i < layerInfo.animations.size(); ++i) {
    284         const WebKit::WebLayerAnimation anim = layerInfo.animations[i];
    285 
    286         switch (anim.operation) {
    287         case WebKit::WebLayerAnimation::AddAnimation: {
    288             const IntSize boxSize = anim.boxSize;
    289             double offset = WTF::currentTime() - anim.startTime;
    290             layer->addAnimation(anim.keyframeList, boxSize, anim.animation.get(), anim.name, offset);
    291             break;
    292         }
    293         case WebKit::WebLayerAnimation::RemoveAnimation:
    294             layer->removeAnimation(anim.name);
    295             break;
    296         case WebKit::WebLayerAnimation::PauseAnimation:
    297             double offset = WTF::currentTime() - anim.startTime;
    298             layer->pauseAnimation(anim.name, offset);
    299             break;
    300         }
    301     }
    302274
    303275    if (layerInfo.isRootLayer && m_rootLayerID != id)
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp

    r100834 r100859  
    281281bool WebGraphicsLayer::addAnimation(const KeyframeValueList& valueList, const IntSize& boxSize, const Animation* anim, const String& keyframesName, double timeOffset)
    282282{
    283     if (!anim || anim->isEmptyOrZeroDuration() || valueList.size() < 2 || (valueList.property() != AnimatedPropertyWebkitTransform && valueList.property() != AnimatedPropertyOpacity))
    284         return false;
    285 
    286     WebLayerAnimation webAnimation(valueList);
    287     webAnimation.name = keyframesName;
    288     webAnimation.operation = WebLayerAnimation::AddAnimation;
    289     webAnimation.boxSize = boxSize;
    290     webAnimation.animation = Animation::create(anim);
    291     webAnimation.startTime = WTF::currentTime() - timeOffset;
    292     m_layerInfo.animations.append(webAnimation);
    293 
    294     m_hasPendingAnimations = true;
    295     notifyChange();
    296 
    297     return true;
     283    return false;
    298284}
    299285
    300286void WebGraphicsLayer::pauseAnimation(const String& animationName, double timeOffset)
    301287{
    302     WebLayerAnimation animation;
    303     animation.name = animationName;
    304     animation.operation = WebLayerAnimation::PauseAnimation;
    305     animation.startTime = WTF::currentTime() - timeOffset;
    306     m_layerInfo.animations.append(animation);
    307     notifyChange();
    308288}
    309289
    310290void WebGraphicsLayer::removeAnimation(const String& animationName)
    311291{
    312     WebLayerAnimation animation;
    313     animation.name = animationName;
    314     animation.operation = WebLayerAnimation::RemoveAnimation;
    315     m_layerInfo.animations.append(animation);
    316     notifyChange();
    317292}
    318293
     
    428403    if (m_hasPendingAnimations)
    429404        notifyAnimationStarted(WTF::currentTime());
    430     m_layerInfo.animations.clear();
    431405    m_hasPendingAnimations = false;
    432406}
Note: See TracChangeset for help on using the changeset viewer.