Title: [106061] trunk/Source/WebCore
Revision
106061
Author
[email protected]
Date
2012-01-26 16:31:29 -0800 (Thu, 26 Jan 2012)

Log Message

We don't need to always repaint overlay scrollbars if they're in layers
https://bugs.webkit.org/show_bug.cgi?id=77159

Reviewed by Beth Dakin.

If a scrollable area has overlay scrollbars we'll always invalidate both scrollbars, regardless of
whether both scroll offsets actually change since they're translucent and we want to draw the new page
contents underneath.

However, if the scrollbars are painted into GraphicsLayers they'll be composited by the GPU, and so we don't
need to repaint them unless the corresponding scroll offset actually changes (which is handled in Scrollbar::updateThumb).

* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::setScrollOffsetFromAnimation):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (106060 => 106061)


--- trunk/Source/WebCore/ChangeLog	2012-01-27 00:16:24 UTC (rev 106060)
+++ trunk/Source/WebCore/ChangeLog	2012-01-27 00:31:29 UTC (rev 106061)
@@ -1,3 +1,20 @@
+2012-01-26  Anders Carlsson  <[email protected]>
+
+        We don't need to always repaint overlay scrollbars if they're in layers
+        https://bugs.webkit.org/show_bug.cgi?id=77159
+
+        Reviewed by Beth Dakin.
+
+        If a scrollable area has overlay scrollbars we'll always invalidate both scrollbars, regardless of
+        whether both scroll offsets actually change since they're translucent and we want to draw the new page
+        contents underneath.
+        
+        However, if the scrollbars are painted into GraphicsLayers they'll be composited by the GPU, and so we don't
+        need to repaint them unless the corresponding scroll offset actually changes (which is handled in Scrollbar::updateThumb).
+
+        * platform/ScrollableArea.cpp:
+        (WebCore::ScrollableArea::setScrollOffsetFromAnimation):
+
 2012-01-26  Joshua Bell  <[email protected]>
 
         IndexedDB: WebCore::IDBKey objects are leaked

Modified: trunk/Source/WebCore/platform/ScrollableArea.cpp (106060 => 106061)


--- trunk/Source/WebCore/platform/ScrollableArea.cpp	2012-01-27 00:16:24 UTC (rev 106060)
+++ trunk/Source/WebCore/platform/ScrollableArea.cpp	2012-01-27 00:31:29 UTC (rev 106061)
@@ -181,7 +181,7 @@
     // Tell the scrollbars to update their thumb postions.
     if (Scrollbar* horizontalScrollbar = this->horizontalScrollbar()) {
         horizontalScrollbar->offsetDidChange();
-        if (horizontalScrollbar->isOverlayScrollbar()) {
+        if (horizontalScrollbar->isOverlayScrollbar() && !hasLayerForHorizontalScrollbar()) {
             if (!verticalScrollbar)
                 horizontalScrollbar->invalidate();
             else {
@@ -195,7 +195,7 @@
     }
     if (verticalScrollbar) {
         verticalScrollbar->offsetDidChange();
-        if (verticalScrollbar->isOverlayScrollbar())
+        if (verticalScrollbar->isOverlayScrollbar() && !hasLayerForVerticalScrollbar())
             verticalScrollbar->invalidate();
     }
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to