Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
requestAnimationFrame doesn't throttle on Mac
https://bugs.webkit.org/show_bug.cgi?id=67171 Reviewed by Simon Fraser. Source/JavaScriptCore: Added WTF_USE_REQUEST_ANIMATION_FRAME_TIMER to allow any platform to run requestAnimationFrame callbacks on a Timer defined in ScriptedAnimationController. Currently only enabled for PLATFORM(MAC) * wtf/Platform.h: Source/WebCore: Changed requestAnimationFrame to use a Timer in ScriptedAnimationController on Mac, rather than runLoopObservers. The Timer is throttled to fire no faster than every 15ms. It is behind a WTF_USE_REQUEST_ANIMATION_FRAME_TIMER flag and can be used by any implementation, but currently it is only enabled by PLATFORM(MAC). * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::ScriptedAnimationController): (WebCore::ScriptedAnimationController::resume): (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): (WebCore::ScriptedAnimationController::scheduleAnimation): (WebCore::ScriptedAnimationController::animationTimerFired): * dom/ScriptedAnimationController.h: * loader/EmptyClients.h: * page/Chrome.cpp: (WebCore::Chrome::scheduleAnimation): * page/ChromeClient.h: Source/WebKit/mac: Removed runLoopObserver for requestAnimationFrame. It's now done by a Timer in ScriptedAnimationController in WebCore. * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: * WebView/WebView.mm: (-[WebView _close]): * WebView/WebViewData.h: * WebView/WebViewInternal.h: Source/WebKit2: Removed runLoopObserver for requestAnimationFrame. It's now done by a Timer in ScriptedAnimationController in WebCore. * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::~WebPage): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/mac/WebPageMac.mm: Canonical link: https://commits.webkit.org/83794@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@94908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Chris Marrin
committed
Sep 10, 2011
1 parent
85a754e
commit 2ef936aba001c310139cc1b14c8c49be2e6ee65c
Showing
20 changed files
with
129 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1159,4 +1159,8 @@ | ||
#define WTF_USE_AVFOUNDATION 1 | ||
#endif | ||
|
||
#if PLATFORM(MAC) | ||
#define WTF_USE_REQUEST_ANIMATION_FRAME_TIMER 1 | ||
#endif | ||
|
||
#endif /* WTF_Platform_h */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.