Title: [118230] trunk/Source/WebCore
- Revision
- 118230
- Author
- [email protected]
- Date
- 2012-05-23 13:12:34 -0700 (Wed, 23 May 2012)
Log Message
[BlackBerry] UI thread unnecessarily blocks on WebKit thread when servicing requestAnimationFrames
https://bugs.webkit.org/show_bug.cgi?id=87289
Patch by Andrew Lo <[email protected]> on 2012-05-23
Reviewed by Antonio Gomes.
requestAnimationFrame already covered by tests in LayoutTests/fast/animation.
If UI thread cannot acquire DisplayRefreshMonitor mutex immediately,
avoid blocking on the mutex, it can trigger the frame change on the next
animation tick instead.
* platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp:
(WebCore::DisplayRefreshMonitor::displayLinkFired):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (118229 => 118230)
--- trunk/Source/WebCore/ChangeLog 2012-05-23 19:54:51 UTC (rev 118229)
+++ trunk/Source/WebCore/ChangeLog 2012-05-23 20:12:34 UTC (rev 118230)
@@ -1,3 +1,19 @@
+2012-05-23 Andrew Lo <[email protected]>
+
+ [BlackBerry] UI thread unnecessarily blocks on WebKit thread when servicing requestAnimationFrames
+ https://bugs.webkit.org/show_bug.cgi?id=87289
+
+ Reviewed by Antonio Gomes.
+
+ requestAnimationFrame already covered by tests in LayoutTests/fast/animation.
+
+ If UI thread cannot acquire DisplayRefreshMonitor mutex immediately,
+ avoid blocking on the mutex, it can trigger the frame change on the next
+ animation tick instead.
+
+ * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp:
+ (WebCore::DisplayRefreshMonitor::displayLinkFired):
+
2012-05-23 Alec Flett <[email protected]>
Implement DOM4 DOMError
Modified: trunk/Source/WebCore/platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp (118229 => 118230)
--- trunk/Source/WebCore/platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp 2012-05-23 19:54:51 UTC (rev 118229)
+++ trunk/Source/WebCore/platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp 2012-05-23 20:12:34 UTC (rev 118230)
@@ -74,16 +74,20 @@
void DisplayRefreshMonitor::displayLinkFired()
{
- MutexLocker lock(m_mutex);
+ if (!m_mutex.tryLock())
+ return;
- if (!m_scheduled || !m_previousFrameDone)
+ if (!m_scheduled || !m_previousFrameDone) {
+ m_mutex.unlock();
return;
+ }
m_previousFrameDone = false;
m_timestamp = currentTime();
callOnMainThread(handleDisplayRefreshedNotificationOnMainThread, this);
+ m_mutex.unlock();
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes