Title: [102998] trunk/Source/WebKit
Revision
102998
Author
[email protected]
Date
2011-12-15 16:41:00 -0800 (Thu, 15 Dec 2011)

Log Message

[BlackBerry] Regression: lots of checkerboarding
https://bugs.webkit.org/show_bug.cgi?id=74611

Patch by Jacky Jiang <[email protected]> on 2011-12-15
Reviewed by Daniel Bates.

Fix a regression caused by r102843 which introduced a lot of unnecessary
checkerboarding. R102843 changed behavior by removing a check for blit
based on whether the render actually took place and whether the
backingstore was in the midst of suspended updates.
The initial anthor is Adam Treat <[email protected]>.

* blackberry/Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::repaint):
(BlackBerry::WebKit::BackingStorePrivate::slowScroll):
(BlackBerry::WebKit::BackingStorePrivate::renderVisibleContents):
(BlackBerry::WebKit::BackingStorePrivate::renderBackingStore):
* blackberry/Api/BackingStore_p.h:
(BlackBerry::WebKit::BackingStorePrivate::isSuspended):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (102997 => 102998)


--- trunk/Source/WebKit/ChangeLog	2011-12-16 00:37:08 UTC (rev 102997)
+++ trunk/Source/WebKit/ChangeLog	2011-12-16 00:41:00 UTC (rev 102998)
@@ -1,3 +1,24 @@
+2011-12-15  Jacky Jiang  <[email protected]>
+
+        [BlackBerry] Regression: lots of checkerboarding
+        https://bugs.webkit.org/show_bug.cgi?id=74611
+
+        Reviewed by Daniel Bates.
+
+        Fix a regression caused by r102843 which introduced a lot of unnecessary
+        checkerboarding. R102843 changed behavior by removing a check for blit
+        based on whether the render actually took place and whether the
+        backingstore was in the midst of suspended updates.
+        The initial anthor is Adam Treat <[email protected]>.
+
+        * blackberry/Api/BackingStore.cpp:
+        (BlackBerry::WebKit::BackingStorePrivate::repaint):
+        (BlackBerry::WebKit::BackingStorePrivate::slowScroll):
+        (BlackBerry::WebKit::BackingStorePrivate::renderVisibleContents):
+        (BlackBerry::WebKit::BackingStorePrivate::renderBackingStore):
+        * blackberry/Api/BackingStore_p.h:
+        (BlackBerry::WebKit::BackingStorePrivate::isSuspended):
+
 2011-12-15  Adam Treat  <[email protected]>
 
         Reviewed by Rob Buis.

Modified: trunk/Source/WebKit/blackberry/Api/BackingStore.cpp (102997 => 102998)


--- trunk/Source/WebKit/blackberry/Api/BackingStore.cpp	2011-12-16 00:37:08 UTC (rev 102997)
+++ trunk/Source/WebKit/blackberry/Api/BackingStore.cpp	2011-12-16 00:41:00 UTC (rev 102998)
@@ -333,8 +333,8 @@
 #endif
 
         if (immediate) {
-            render(rect);
-            blitVisibleContents();
+            if (render(rect))
+                blitVisibleContents();
         } else
             m_renderQueue->addToQueue(RenderQueue::RegularRender, rect);
     }
@@ -354,8 +354,8 @@
     Platform::IntRect rect = m_webPage->d->mapToTransformed(m_client->mapFromViewportToContents(windowRect));
 
     if (immediate) {
-        render(rect);
-        blitVisibleContents();
+        if (render(rect) && !isSuspended())
+            blitVisibleContents();
     } else {
         m_renderQueue->addToQueue(RenderQueue::VisibleScroll, rect);
         // We only blit here if the client did not generate the scroll as the client
@@ -1087,16 +1087,19 @@
     m_webPage->d->requestLayoutIfNeeded();
 }
 
-void BackingStorePrivate::renderVisibleContents()
+bool BackingStorePrivate::renderVisibleContents()
 {
     Platform::IntRect renderRect = shouldDirectRenderingToWindow() ? visibleContentsRect() : visibleTilesRect();
-    render(renderRect);
-    m_renderQueue->clear(renderRect, true /*clearRegularRenderJobs*/);
+    if (render(renderRect)) {
+        m_renderQueue->clear(renderRect, true /*clearRegularRenderJobs*/);
+        return true;
+    }
+    return false;
 }
 
-void BackingStorePrivate::renderBackingStore()
+bool BackingStorePrivate::renderBackingStore()
 {
-    render(frontState()->backingStoreRect());
+    return render(frontState()->backingStoreRect());
 }
 
 void BackingStorePrivate::blitVisibleContents(bool force)

Modified: trunk/Source/WebKit/blackberry/Api/BackingStore_p.h (102997 => 102998)


--- trunk/Source/WebKit/blackberry/Api/BackingStore_p.h	2011-12-16 00:37:08 UTC (rev 102997)
+++ trunk/Source/WebKit/blackberry/Api/BackingStore_p.h	2011-12-16 00:41:00 UTC (rev 102998)
@@ -110,6 +110,8 @@
     // the minimum number of tiles required to scroll.
     bool shouldDirectRenderingToWindow() const;
 
+    bool isSuspended() const { return m_suspendBackingStoreUpdates; }
+
     // Suspends all screen updates so that 'blitContents' is disabled.
     void suspendScreenAndBackingStoreUpdates();
 
@@ -180,8 +182,8 @@
     void requestLayoutIfNeeded() const;
 
     // Helper render methods.
-    void renderVisibleContents();
-    void renderBackingStore();
+    bool renderVisibleContents();
+    bool renderBackingStore();
     void blitVisibleContents(bool force = false);
 
     // Assumes the rect to be in window/viewport coordinates.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to