[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

andersca at apple.com andersca at apple.com
Sun Feb 20 23:17:18 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit bb9a7620364eab5baaff7d7196167223cb72e66e
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 19 18:36:46 2011 +0000

    2011-01-19  Anders Carlsson  <andersca at apple.com>
    
            Reviewed by Darin Adler.
    
            Throttle sending of SetSize messages
            https://bugs.webkit.org/show_bug.cgi?id=52727
    
            * UIProcess/DrawingAreaProxyImpl.cpp:
            (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
            Initialize m_isWaitingForDidSetSize to false.
    
            (WebKit::DrawingAreaProxyImpl::didSetSize):
            Null out the backing store.
    
            (WebKit::DrawingAreaProxyImpl::sendSetSize):
            If m_isWaitingForDidSetSize is true, do nothing. Otherwise, set m_isWaitingForDidSetSize
            to true and send a SetSize message.
    
            * UIProcess/DrawingAreaProxyImpl.h:
            Add m_isWaitingForDidSetSize.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76139 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index 81aa69c..e0fa59e 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -2,6 +2,27 @@
 
         Reviewed by Darin Adler.
 
+        Throttle sending of SetSize messages
+        https://bugs.webkit.org/show_bug.cgi?id=52727
+
+        * UIProcess/DrawingAreaProxyImpl.cpp:
+        (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
+        Initialize m_isWaitingForDidSetSize to false.
+
+        (WebKit::DrawingAreaProxyImpl::didSetSize):
+        Null out the backing store.
+
+        (WebKit::DrawingAreaProxyImpl::sendSetSize):
+        If m_isWaitingForDidSetSize is true, do nothing. Otherwise, set m_isWaitingForDidSetSize
+        to true and send a SetSize message.
+
+        * UIProcess/DrawingAreaProxyImpl.h:
+        Add m_isWaitingForDidSetSize.
+
+2011-01-19  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Darin Adler.
+
         Pass WebPageCreationParameters to DrawingArea::create
         https://bugs.webkit.org/show_bug.cgi?id=52726
 
diff --git a/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp b/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
index 386c069..49d60bb 100644
--- a/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
+++ b/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
@@ -45,6 +45,7 @@ PassOwnPtr<DrawingAreaProxyImpl> DrawingAreaProxyImpl::create(WebPageProxy* webP
 
 DrawingAreaProxyImpl::DrawingAreaProxyImpl(WebPageProxy* webPageProxy)
     : DrawingAreaProxy(DrawingAreaInfo::Impl, webPageProxy)
+    , m_isWaitingForDidSetSize(false)
 {
 }
 
@@ -106,6 +107,12 @@ void DrawingAreaProxyImpl::update(const UpdateInfo& updateInfo)
 
 void DrawingAreaProxyImpl::didSetSize()
 {
+    ASSERT(m_isWaitingForDidSetSize);
+    m_isWaitingForDidSetSize = false;
+
+    // FIXME: Send a new SetSize message if needed.
+
+    m_backingStore = nullptr;
 }
 
 void DrawingAreaProxyImpl::incorporateUpdate(const UpdateInfo& updateInfo)
@@ -134,6 +141,10 @@ void DrawingAreaProxyImpl::sendSetSize()
     if (!m_webPageProxy->isValid())
         return;
 
+    if (m_isWaitingForDidSetSize)
+        return;
+
+    m_isWaitingForDidSetSize = true;
     m_webPageProxy->process()->send(Messages::DrawingArea::SetSize(m_size), m_webPageProxy->pageID());
 }
 
diff --git a/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h b/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h
index 0de7ada..b8e39c2 100644
--- a/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h
+++ b/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h
@@ -57,6 +57,10 @@ private:
     void incorporateUpdate(const UpdateInfo&);
     void sendSetSize();
 
+    // Whether we've sent a SetSize message and are now waiting for a DidSetSize message.
+    // Used to throttle SetSize messages so we don't send them faster than the Web process can handle.
+    bool m_isWaitingForDidSetSize;
+
     OwnPtr<BackingStore> m_backingStore;
 };
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list