Changeset 116786 in webkit
- Timestamp:
- May 11, 2012 11:04:15 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r116784 r116786 1 2012-05-11 Ian Vollick <vollick@chromium.org> 2 3 [chromium] Ensure that animations continue to run when transform-style is changed 4 https://bugs.webkit.org/show_bug.cgi?id=83283 5 6 Reviewed by James Robinson. 7 8 * animations/change-transform-style-during-animation-expected.png: Added. 9 * animations/change-transform-style-during-animation-expected.txt: Added. 10 * animations/change-transform-style-during-animation.html: Added. 11 1 12 2012-05-11 Dave Tharp <dtharp@codeaurora.org> 2 13 -
trunk/Source/WebCore/ChangeLog
r116783 r116786 1 2012-05-11 Ian Vollick <vollick@chromium.org> 2 3 [chromium] Ensure that animations continue to run when transform-style is changed 4 https://bugs.webkit.org/show_bug.cgi?id=83283 5 6 Make sure that we transfer animations when changing layers due to a transform-style change. 7 Unit tested in GraphicsLayerChromiumTest.updateLayerPreserves3DWithAnimations 8 9 Reviewed by James Robinson. 10 11 Test: animations/change-transform-style-during-animation.html 12 13 * platform/graphics/chromium/GraphicsLayerChromium.cpp: 14 (WebCore::GraphicsLayerChromium::updateLayerPreserves3D): 15 * platform/graphics/chromium/LayerChromium.cpp: 16 (WebCore::LayerChromium::setLayerAnimationController): 17 (WebCore::LayerChromium::releaseLayerAnimationController): 18 (WebCore): 19 (WebCore::LayerChromium::notifyAnimationStarted): 20 * platform/graphics/chromium/LayerChromium.h: 21 (LayerChromium): 22 * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: 23 (WebCore::CCLayerAnimationController::CCLayerAnimationController): 24 (WebCore::CCLayerAnimationController::pushAnimationUpdatesTo): 25 (WebCore::CCLayerAnimationController::notifyAnimationStarted): 26 (WebCore::CCLayerAnimationController::setClient): 27 (WebCore): 28 (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread): 29 (WebCore::CCLayerAnimationController::replaceImplThreadAnimations): 30 * platform/graphics/chromium/cc/CCLayerAnimationController.h: 31 (CCLayerAnimationController): 32 (WebCore::CCLayerAnimationController::setForceSync): 33 1 34 2012-05-11 Tommy Widenflycht <tommyw@google.com> 2 35 -
trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
r116456 r116786 608 608 m_transformLayer->setPreserves3D(true); 609 609 m_transformLayer->setLayerAnimationDelegate(this); 610 m_transformLayer->setLayerAnimationController(m_layer->releaseLayerAnimationController()); 610 611 611 612 // Copy the position from this layer. … … 639 640 m_transformLayer->parent()->replaceChild(m_transformLayer.get(), m_layer.get()); 640 641 642 m_layer->setLayerAnimationDelegate(this); 643 m_layer->setLayerAnimationController(m_transformLayer->releaseLayerAnimationController()); 644 641 645 // Release the transform layer. 642 646 m_transformLayer->setLayerAnimationDelegate(0); -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
r116714 r116786 633 633 { 634 634 m_layerAnimationController = layerAnimationController; 635 setNeedsCommit(); 635 if (m_layerAnimationController) { 636 m_layerAnimationController->setClient(this); 637 m_layerAnimationController->setForceSync(); 638 } 639 setNeedsCommit(); 640 } 641 642 PassOwnPtr<CCLayerAnimationController> LayerChromium::releaseLayerAnimationController() 643 { 644 OwnPtr<CCLayerAnimationController> toReturn = m_layerAnimationController.release(); 645 m_layerAnimationController = CCLayerAnimationController::create(this); 646 return toReturn.release(); 636 647 } 637 648 … … 644 655 { 645 656 m_layerAnimationController->notifyAnimationStarted(event); 646 m_layerAnimationDelegate->notifyAnimationStarted(wallClockTime); 657 if (m_layerAnimationDelegate) 658 m_layerAnimationDelegate->notifyAnimationStarted(wallClockTime); 647 659 } 648 660 -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h
r116195 r116786 241 241 CCLayerAnimationController* layerAnimationController() { return m_layerAnimationController.get(); } 242 242 void setLayerAnimationController(PassOwnPtr<CCLayerAnimationController>); 243 PassOwnPtr<CCLayerAnimationController> releaseLayerAnimationController(); 243 244 244 245 void setLayerAnimationDelegate(CCLayerAnimationDelegate* layerAnimationDelegate) { m_layerAnimationDelegate = layerAnimationDelegate; } -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerAnimationController.cpp
r116714 r116786 125 125 126 126 CCLayerAnimationController::CCLayerAnimationController(CCLayerAnimationControllerClient* client) 127 : m_client(client) 127 : m_forceSync(false) 128 , m_client(client) 128 129 { 129 130 } … … 204 205 void CCLayerAnimationController::pushAnimationUpdatesTo(CCLayerAnimationController* controllerImpl) 205 206 { 206 pushNewAnimationsToImplThread(controllerImpl); 207 removeAnimationsCompletedOnMainThread(controllerImpl); 208 pushPropertiesToImplThread(controllerImpl); 207 if (m_forceSync) { 208 replaceImplThreadAnimations(controllerImpl); 209 m_forceSync = false; 210 } else { 211 pushNewAnimationsToImplThread(controllerImpl); 212 removeAnimationsCompletedOnMainThread(controllerImpl); 213 pushPropertiesToImplThread(controllerImpl); 214 } 209 215 } 210 216 … … 254 260 { 255 261 for (size_t i = 0; i < m_activeAnimations.size(); ++i) { 256 if (m_activeAnimations[i]->group() == event.groupId && m_activeAnimations[i]->targetProperty() == event.targetProperty) { 257 ASSERT(m_activeAnimations[i]->needsSynchronizedStartTime()); 262 if (m_activeAnimations[i]->group() == event.groupId && m_activeAnimations[i]->targetProperty() == event.targetProperty && m_activeAnimations[i]->needsSynchronizedStartTime()) { 258 263 m_activeAnimations[i]->setNeedsSynchronizedStartTime(false); 259 264 m_activeAnimations[i]->setStartTime(event.monotonicTime); … … 261 266 } 262 267 } 268 } 269 270 void CCLayerAnimationController::setClient(CCLayerAnimationControllerClient* client) 271 { 272 m_client = client; 263 273 } 264 274 … … 282 292 // The new animation should be set to run as soon as possible. 283 293 toAdd->setRunState(CCActiveAnimation::WaitingForTargetAvailability, 0); 294 toAdd->setStartTime(0); 284 295 controllerImpl->add(toAdd.release()); 285 296 } … … 438 449 } 439 450 451 void CCLayerAnimationController::replaceImplThreadAnimations(CCLayerAnimationController* controllerImpl) const 452 { 453 controllerImpl->m_activeAnimations.clear(); 454 for (size_t i = 0; i < m_activeAnimations.size(); ++i) 455 controllerImpl->add(m_activeAnimations[i]->cloneForImplThread()); 456 } 457 440 458 void CCLayerAnimationController::tickAnimations(double monotonicTime) 441 459 { -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerAnimationController.h
r115519 r116786 91 91 void notifyAnimationStarted(const CCAnimationEvent&); 92 92 93 // If a sync is forced, then the next time animation updates are pushed to the impl 94 // thread, all animations will be transferred. 95 void setForceSync() { m_forceSync = true; } 96 97 void setClient(CCLayerAnimationControllerClient*); 98 93 99 protected: 94 100 explicit CCLayerAnimationController(CCLayerAnimationControllerClient*); … … 100 106 void removeAnimationsCompletedOnMainThread(CCLayerAnimationController*) const; 101 107 void pushPropertiesToImplThread(CCLayerAnimationController*) const; 108 void replaceImplThreadAnimations(CCLayerAnimationController*) const; 102 109 103 110 void startAnimationsWaitingForNextTick(double monotonicTime, CCAnimationEventsVector*); … … 109 116 void tickAnimations(double monotonicTime); 110 117 118 // If this is true, we force a sync to the impl thread. 119 bool m_forceSync; 120 111 121 CCLayerAnimationControllerClient* m_client; 112 122 Vector<OwnPtr<CCActiveAnimation> > m_activeAnimations; -
trunk/Source/WebKit/chromium/ChangeLog
r116782 r116786 1 2012-05-11 Ian Vollick <vollick@chromium.org> 2 3 [chromium] Ensure that animations continue to run when transform-style is changed 4 https://bugs.webkit.org/show_bug.cgi?id=83283 5 6 Reviewed by James Robinson. 7 8 * WebKit.gypi: 9 * tests/GraphicsLayerChromiumTest.cpp: Added. 10 (WebKitTests): 11 (MockGraphicsLayerClient): 12 (WebKitTests::MockGraphicsLayerClient::notifyAnimationStarted): 13 (WebKitTests::MockGraphicsLayerClient::notifySyncRequired): 14 (WebKitTests::MockGraphicsLayerClient::paintContents): 15 (WebKitTests::MockGraphicsLayerClient::showDebugBorders): 16 (WebKitTests::MockGraphicsLayerClient::showRepaintCounter): 17 (WebKitTests::TEST): 18 1 19 2012-05-11 Min Qin <qinmin@google.com> 2 20 -
trunk/Source/WebKit/chromium/WebKit.gypi
r116722 r116786 106 106 'tests/FrameTestHelpers.cpp', 107 107 'tests/FrameTestHelpers.h', 108 'tests/GraphicsLayerChromiumTest.cpp', 108 109 'tests/IDBBindingUtilitiesTest.cpp', 109 110 'tests/IDBKeyPathTest.cpp',
Note: See TracChangeset
for help on using the changeset viewer.