Title: [115751] trunk/Source/WebKit2
Revision
115751
Author
[email protected]
Date
2012-05-01 15:03:49 -0700 (Tue, 01 May 2012)

Log Message

Use the new barrier function in TiledCoreAnimationDrawingArea::forceRepaintAsync
https://bugs.webkit.org/show_bug.cgi?id=85313
<rdar://problem/10996039>

Reviewed by Sam Weinig.

Use the new dispatchAfterEnsuringUpdatedScrollPosition function in forceRepaintAsync to
ensure that the scroll position is up to date.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (115750 => 115751)


--- trunk/Source/WebKit2/ChangeLog	2012-05-01 21:34:53 UTC (rev 115750)
+++ trunk/Source/WebKit2/ChangeLog	2012-05-01 22:03:49 UTC (rev 115751)
@@ -1,3 +1,17 @@
+2012-05-01  Anders Carlsson  <[email protected]>
+
+        Use the new barrier function in TiledCoreAnimationDrawingArea::forceRepaintAsync
+        https://bugs.webkit.org/show_bug.cgi?id=85313
+        <rdar://problem/10996039>
+
+        Reviewed by Sam Weinig.
+
+        Use the new dispatchAfterEnsuringUpdatedScrollPosition function in forceRepaintAsync to
+        ensure that the scroll position is up to date.
+
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
+
 2012-05-01  Kenneth Rohde Christiansen  <[email protected]>
 
         [Qt] Add an experimental extension to set the min. contents width

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (115750 => 115751)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2012-05-01 21:34:53 UTC (rev 115750)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2012-05-01 22:03:49 UTC (rev 115751)
@@ -135,27 +135,15 @@
     [CATransaction synchronize];
 }
 
-static void forceRepaintAndSendMessage(uint64_t webPageID, uint64_t callbackID)
-{
-    WebPage* webPage = WebProcess::shared().webPage(webPageID);
-    if (!webPage)
-        return;
-
-    webPage->drawingArea()->forceRepaint();
-    webPage->send(Messages::WebPageProxy::VoidCallback(callbackID));
-}
-
-static void dispatchBackToMainThread(uint64_t webPageID, uint64_t callbackID)
-{
-    callOnMainThread(bind(forceRepaintAndSendMessage, webPageID, callbackID));
-}
-
 bool TiledCoreAnimationDrawingArea::forceRepaintAsync(uint64_t callbackID)
 {
     if (m_layerTreeStateIsFrozen)
         return false;
 
-    ScrollingThread::dispatch(bind(dispatchBackToMainThread, m_webPage->pageID(), callbackID));
+    dispatchAfterEnsuringUpdatedScrollPosition(bind(^{
+        m_webPage->drawingArea()->forceRepaint();
+        m_webPage->send(Messages::WebPageProxy::VoidCallback(callbackID));
+    }));
     return true;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to