Changeset 147121 in webkit
- Timestamp:
- Mar 28, 2013 9:00:06 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r147120 r147121 1 2013-03-28 ChangSeok Oh <changseok.oh@collabora.com> 2 3 [GTK][AC] Animating layer disappears while running with clutter backend 4 https://bugs.webkit.org/show_bug.cgi?id=110470 5 6 Reviewed by Gustavo Noronha Silva. 7 8 The reason of this issue is that clutter_actor_remove_child leads to stopping animations 9 of child actor. ClutterActor's animation could be defined only when it has a parent actor. 10 So we should avoid the case calling the api as much as we can. At least we don't 11 need to reset a actor's parent at all if the current parent is same with new one. 12 If we can't avoid invoking clutter_actor_remove_child for an animating actor, we may apply 13 a more complicated way to keep the animation. But I haven't faced such a case yet. 14 15 Covered by existing animation tests. 16 17 * platform/graphics/clutter/GraphicsLayerActor.cpp: 18 (graphicsLayerActorSetSublayers): 19 * platform/graphics/clutter/GraphicsLayerClutter.cpp: 20 (WebCore::GraphicsLayerClutter::recursiveCommitChanges): 21 (WebCore::GraphicsLayerClutter::updateSublayerList): 22 1 23 2013-03-28 Xianzhu Wang <wangxianzhu@chromium.org> 2 24 -
trunk/Source/WebCore/platform/graphics/clutter/GraphicsLayerActor.cpp
r142749 r147121 471 471 } 472 472 473 ClutterActor* newParentActor = CLUTTER_ACTOR(layer); 473 474 for (size_t i = 0; i < subLayers.size(); ++i) { 474 ClutterActor* layerActor = CLUTTER_ACTOR(subLayers[i].get()); 475 clutter_actor_add_child(CLUTTER_ACTOR(layer), layerActor); 475 ClutterActor* childActor = CLUTTER_ACTOR(subLayers[i].get()); 476 ClutterActor* oldParentActor = clutter_actor_get_parent(childActor); 477 if (oldParentActor) { 478 if (oldParentActor == newParentActor) 479 continue; 480 clutter_actor_remove_child(oldParentActor, childActor); 481 } 482 clutter_actor_add_child(newParentActor, childActor); 476 483 } 477 484 } -
trunk/Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp
r146608 r147121 579 579 580 580 for (size_t i = 0; i < numChildren; ++i) { 581 GraphicsLayerClutter* cur Child = static_cast<GraphicsLayerClutter*>(childLayers[i]);582 cur Child->recursiveCommitChanges(localState, pageScaleFactor, baseRelativePosition, affectedByPageScale);581 GraphicsLayerClutter* currentChild = static_cast<GraphicsLayerClutter*>(childLayers[i]); 582 currentChild->recursiveCommitChanges(localState, pageScaleFactor, baseRelativePosition, affectedByPageScale); 583 583 } 584 584 … … 659 659 const Vector<GraphicsLayer*>& childLayers = children(); 660 660 661 if (childLayers.size() > 0) { 662 size_t numChildren = childLayers.size(); 663 for (size_t i = 0; i < numChildren; ++i) { 664 GraphicsLayerClutter* curChild = static_cast<GraphicsLayerClutter*>(childLayers[i]); 665 GraphicsLayerActor* childLayer = curChild->layerForSuperlayer(); 666 g_assert(GRAPHICS_LAYER_IS_ACTOR(childLayer)); 667 newSublayers.append(childLayer); 668 } 669 670 for (size_t i = 0; i < newSublayers.size(); i++) { 671 ClutterActor* layerActor = CLUTTER_ACTOR(newSublayers[i].get()); 672 ClutterActor* parentActor = clutter_actor_get_parent(layerActor); 673 if (parentActor) 674 clutter_actor_remove_child(parentActor, layerActor); 675 } 661 size_t numChildren = childLayers.size(); 662 for (size_t i = 0; i < numChildren; ++i) { 663 GraphicsLayerClutter* currentChild = static_cast<GraphicsLayerClutter*>(childLayers[i]); 664 GraphicsLayerActor* childLayer = currentChild->layerForSuperlayer(); 665 ASSERT(GRAPHICS_LAYER_IS_ACTOR(childLayer)); 666 667 newSublayers.append(childLayer); 676 668 } 677 669
Note: See TracChangeset
for help on using the changeset viewer.