Changeset 100859 in webkit
- Timestamp:
- Nov 19, 2011 12:15:12 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r100858 r100859 1 2011-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 1 13 2011-11-19 Huang Dongsung <luxtella@company100.net> 2 14 -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp
r100834 r100859 985 985 } 986 986 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 997 987 void TextureMapperNode::syncCompositingState(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper, int options) 998 988 { -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperNode.h
r100834 r100859 142 142 void syncCompositingState(GraphicsLayerTextureMapper*, int syncOptions = 0); 143 143 void syncCompositingState(GraphicsLayerTextureMapper*, TextureMapper*, int syncOptions = 0); 144 void syncAnimationsRecursively();145 144 IntSize size() const { return IntSize(m_size.width(), m_size.height()); } 146 145 void setTransform(const TransformationMatrix&); -
trunk/Source/WebKit2/ChangeLog
r100842 r100859 1 2011-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 1 29 2011-11-18 Sheriff Bot <webkit.review.bot@gmail.com> 2 30 -
trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
r100834 r100859 648 648 } 649 649 650 650 651 void ArgumentCoder<TransformationMatrix>::encode(ArgumentEncoder* encoder, const TransformationMatrix& transformationMatrix) 651 652 { … … 1062 1063 } 1063 1064 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());1065 void 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()); 1076 1077 } 1077 1078 … … 1099 1100 } 1100 1101 1101 bool ArgumentCoder< RefPtr<Animation> >::decode(ArgumentDecoder* decoder, RefPtr<Animation>& animation)1102 bool ArgumentCoder<Animation>::decode(ArgumentDecoder* decoder, Animation& animation) 1102 1103 { 1103 1104 bool isDelaySet, isDirectionSet, isDurationSet, isFillModeSet, isIterationCountSet, isNameSet, isPlayStateSet, isPropertySet, isTimingFunctionSet; … … 1107 1108 String name; 1108 1109 1110 animation.clearAll(); 1111 1109 1112 double delay; 1110 1113 if (!decodeBoolAndValue(decoder, isDelaySet, delay)) … … 1131 1134 return false; 1132 1135 1133 animation = Animation::create();1134 animation->clearAll();1135 1136 1136 if (isDelaySet) 1137 animation ->setDelay(delay);1137 animation.setDelay(delay); 1138 1138 if (isDirectionSet) 1139 animation ->setDirection(direction);1139 animation.setDirection(direction); 1140 1140 if (isDurationSet) 1141 animation ->setDuration(duration);1141 animation.setDuration(duration); 1142 1142 if (isFillModeSet) 1143 animation ->setFillMode(fillMode);1143 animation.setFillMode(fillMode); 1144 1144 if (isIterationCountSet) 1145 animation ->setIterationCount(iterationCount);1145 animation.setIterationCount(iterationCount); 1146 1146 if (isNameSet) 1147 animation ->setName(name);1147 animation.setName(name); 1148 1148 if (isPlayStateSet) 1149 animation ->setPlayState(playState);1149 animation.setPlayState(playState); 1150 1150 if (isPropertySet) 1151 animation ->setProperty(property);1151 animation.setProperty(property); 1152 1152 if (isTimingFunctionSet) 1153 animation ->setTimingFunction(timingFunction);1153 animation.setTimingFunction(timingFunction); 1154 1154 1155 1155 return true; -
trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h
r100834 r100859 289 289 }; 290 290 291 template<> struct ArgumentCoder< RefPtr<WebCore::Animation>> {292 static void encode(ArgumentEncoder*, const RefPtr<WebCore::Animation>&);293 static bool decode(ArgumentDecoder*, RefPtr<WebCore::Animation>&);291 template<> struct ArgumentCoder<WebCore::Animation> { 292 static void encode(ArgumentEncoder*, const WebCore::Animation&); 293 static bool decode(ArgumentDecoder*, WebCore::Animation&); 294 294 }; 295 295 #endif -
trunk/Source/WebKit2/Shared/WebLayerTreeInfo.cpp
r100834 r100859 36 36 // We have to divide it to several lines, because CoreIPC::In/Out takes a maximum of 10 arguments. 37 37 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)); 39 39 } 40 40 … … 44 44 if (!decoder->decode(CoreIPC::Out(info.id, info.name, info.parent, info.children, info.flags, info.replica, info.mask, info.imageBackingStoreID))) 45 45 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))) 47 47 return false; 48 49 48 return true; 50 49 } … … 70 69 } 71 70 72 void WebLayerAnimation::encode(CoreIPC::ArgumentEncoder* encoder) const73 {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 91 71 } 92 72 #endif -
trunk/Source/WebKit2/Shared/WebLayerTreeInfo.h
r100834 r100859 50 50 }; 51 51 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 PauseAnimation61 } 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 71 52 struct WebLayerInfo { 72 53 String name; … … 99 80 }; 100 81 Vector<WebLayerID> children; 101 Vector<WebLayerAnimation> animations;102 82 RefPtr<ShareableBitmap> imageBackingStore; 103 83 -
trunk/Source/WebKit2/UIProcess/LayerTreeHostProxy.h
r100834 r100859 126 126 Vector<WebLayerID> m_layersToDelete; 127 127 128 #if PLATFORM(QT)129 void didFireViewportUpdateTimer(Timer<LayerTreeHostProxy>*);130 Timer<LayerTreeHostProxy> m_viewportUpdateTimer;131 #endif132 133 128 LayerMap m_layers; 134 129 WebLayerID m_rootLayerID; -
trunk/Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp
r100834 r100859 155 155 : m_animationTimer(RunLoop::main(), this, &LayerTreeHostProxy::updateViewport) 156 156 , m_drawingAreaProxy(drawingAreaProxy) 157 , m_viewportUpdateTimer(this, &LayerTreeHostProxy::didFireViewportUpdateTimer)158 157 , m_rootLayerID(0) 159 158 { … … 210 209 m_textureMapper->endPainting(); 211 210 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(); 221 213 } 222 214 … … 280 272 } 281 273 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 }302 274 303 275 if (layerInfo.isRootLayer && m_rootLayerID != id) -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp
r100834 r100859 281 281 bool WebGraphicsLayer::addAnimation(const KeyframeValueList& valueList, const IntSize& boxSize, const Animation* anim, const String& keyframesName, double timeOffset) 282 282 { 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; 298 284 } 299 285 300 286 void WebGraphicsLayer::pauseAnimation(const String& animationName, double timeOffset) 301 287 { 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();308 288 } 309 289 310 290 void WebGraphicsLayer::removeAnimation(const String& animationName) 311 291 { 312 WebLayerAnimation animation;313 animation.name = animationName;314 animation.operation = WebLayerAnimation::RemoveAnimation;315 m_layerInfo.animations.append(animation);316 notifyChange();317 292 } 318 293 … … 428 403 if (m_hasPendingAnimations) 429 404 notifyAnimationStarted(WTF::currentTime()); 430 m_layerInfo.animations.clear();431 405 m_hasPendingAnimations = false; 432 406 }
Note: See TracChangeset
for help on using the changeset viewer.