[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:30:31 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit f51f2f8a4bdbe19c7df03bc3adf254efa129a6ae
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 21 00:13:32 2011 +0000

    2011-01-20  Anders Carlsson  <andersca at apple.com>
    
            Reviewed by Darin Adler.
    
            Keep track of the latest update timestamp in the backing store
            https://bugs.webkit.org/show_bug.cgi?id=52848
    
            * Shared/UpdateInfo.h:
            (WebKit::UpdateInfo::UpdateInfo):
            Initialize timestamp to 0.
    
            * UIProcess/BackingStore.cpp:
            (WebKit::BackingStore::BackingStore):
            Initialize m_latestUpdateTimestamp to 0.
    
            (WebKit::BackingStore::incorporateUpdate):
            If the update is too old, discard it. Otherwise, create a bitmap
            and pass it to platformIncorporateUpdate. Finally update the timestamp.
    
            * UIProcess/BackingStore.h:
            Add m_latestUpdateTimestamp.
    
            * UIProcess/mac/BackingStoreMac.mm:
            (WebKit::BackingStore::platformIncorporateUpdate):
            Update now that we are already given the shareable bitmap.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76305 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index 703bf66..9dff9d9 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,3 +1,29 @@
+2011-01-20  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Darin Adler.
+
+        Keep track of the latest update timestamp in the backing store
+        https://bugs.webkit.org/show_bug.cgi?id=52848
+
+        * Shared/UpdateInfo.h:
+        (WebKit::UpdateInfo::UpdateInfo):
+        Initialize timestamp to 0.
+
+        * UIProcess/BackingStore.cpp:
+        (WebKit::BackingStore::BackingStore):
+        Initialize m_latestUpdateTimestamp to 0.
+
+        (WebKit::BackingStore::incorporateUpdate):
+        If the update is too old, discard it. Otherwise, create a bitmap
+        and pass it to platformIncorporateUpdate. Finally update the timestamp.
+
+        * UIProcess/BackingStore.h:
+        Add m_latestUpdateTimestamp.
+
+        * UIProcess/mac/BackingStoreMac.mm:
+        (WebKit::BackingStore::platformIncorporateUpdate):
+        Update now that we are already given the shareable bitmap.
+
 2011-01-20  Beth Dakin  <bdakin at apple.com>
 
         Reviewed by Geoffrey Garen.
diff --git a/Source/WebKit2/Shared/UpdateInfo.h b/Source/WebKit2/Shared/UpdateInfo.h
index 4d1f3aa..2ceb164 100644
--- a/Source/WebKit2/Shared/UpdateInfo.h
+++ b/Source/WebKit2/Shared/UpdateInfo.h
@@ -41,7 +41,7 @@ class UpdateInfo {
     WTF_MAKE_NONCOPYABLE(UpdateInfo);
 
 public:
-    UpdateInfo() { }
+    UpdateInfo() : timestamp(0) { }
 
     void encode(CoreIPC::ArgumentEncoder*) const;
     static bool decode(CoreIPC::ArgumentDecoder*, UpdateInfo&);
diff --git a/Source/WebKit2/UIProcess/BackingStore.cpp b/Source/WebKit2/UIProcess/BackingStore.cpp
index 765af0a..b468b6b 100644
--- a/Source/WebKit2/UIProcess/BackingStore.cpp
+++ b/Source/WebKit2/UIProcess/BackingStore.cpp
@@ -25,6 +25,9 @@
 
 #include "BackingStore.h"
 
+#include "ShareableBitmap.h"
+#include "UpdateInfo.h"
+
 using namespace WebCore;
 
 #if !PLATFORM(MAC)
@@ -41,6 +44,7 @@ PassOwnPtr<BackingStore> BackingStore::create(const IntSize& size, WebPageProxy*
 BackingStore::BackingStore(const IntSize& size, WebPageProxy* webPageProxy)
     : m_size(size)
     , m_webPageProxy(webPageProxy)
+    , m_latestUpdateTimestamp(0)
 {
     ASSERT(!m_size.isEmpty());
 }
@@ -49,4 +53,22 @@ BackingStore::~BackingStore()
 {
 }
 
+void BackingStore::incorporateUpdate(const UpdateInfo& updateInfo)
+{
+    if (updateInfo.timestamp < m_latestUpdateTimestamp) {
+        // The update is too old, discard it.
+        return;
+    }
+
+    ASSERT(m_size == updateInfo.viewSize);
+    
+    RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create(updateInfo.updateRectBounds.size(), updateInfo.bitmapHandle);
+    if (!bitmap)
+        return;
+    
+    incorporateUpdate(bitmap.get(), updateInfo);
+
+    m_latestUpdateTimestamp = updateInfo.timestamp;
+}
+
 } // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/BackingStore.h b/Source/WebKit2/UIProcess/BackingStore.h
index e4ee2a1..4164d33 100644
--- a/Source/WebKit2/UIProcess/BackingStore.h
+++ b/Source/WebKit2/UIProcess/BackingStore.h
@@ -40,6 +40,7 @@ namespace WebCore {
 
 namespace WebKit {
 
+class ShareableBitmap;
 class UpdateInfo;
 class WebPageProxy;
 
@@ -60,10 +61,12 @@ public:
 private:
     BackingStore(const WebCore::IntSize&, WebPageProxy*);
 
+    void incorporateUpdate(ShareableBitmap*, const UpdateInfo&);
     void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
 
     WebCore::IntSize m_size;
     WebPageProxy* m_webPageProxy;
+    double m_latestUpdateTimestamp;
 
 #if PLATFORM(MAC)
     CGContextRef backingStoreContext();
diff --git a/Source/WebKit2/UIProcess/mac/BackingStoreMac.mm b/Source/WebKit2/UIProcess/mac/BackingStoreMac.mm
index 7db8bb1..eacfefa 100644
--- a/Source/WebKit2/UIProcess/mac/BackingStoreMac.mm
+++ b/Source/WebKit2/UIProcess/mac/BackingStoreMac.mm
@@ -92,14 +92,8 @@ CGContextRef BackingStore::backingStoreContext()
     return m_bitmapContext.get();
 }
 
-void BackingStore::incorporateUpdate(const UpdateInfo& updateInfo)
+void BackingStore::incorporateUpdate(ShareableBitmap* bitmap, const UpdateInfo& updateInfo)
 {
-    ASSERT(m_size == updateInfo.viewSize);
-
-    RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create(updateInfo.updateRectBounds.size(), updateInfo.bitmapHandle);
-    if (!bitmap)
-        return;
-
     CGContextRef context = backingStoreContext();
 
     scroll(updateInfo.scrollRect, updateInfo.scrollOffset);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list