Title: [128492] trunk/Source
Revision
128492
Author
[email protected]
Date
2012-09-13 12:26:35 -0700 (Thu, 13 Sep 2012)

Log Message

Add new accelerated compositing for overflow scroll setting.
https://bugs.webkit.org/show_bug.cgi?id=95885

Patch by Glenn Hartmann <[email protected]> on 2012-09-13
Reviewed by James Robinson.

wkb.ug/91117 introduces RenderLayer::usesCompositedScrolling(), which
currently returns true if we're overflow scrolling and the element has
been styled with '-webkit-overflow-scrolling: touch'. If this is true,
we get promoted to a composited layer, the associated RenderLayerBacking
gets special scrolling layers and in response to RenderLayer::scrollTo()
we no longer have to invalidate everything to get the scrolled content
in the right spot, thereby avoiding very expensive repaints. It's
unfortunate that we require -webkit-overflow-scrolling: touch, though.
It would be nice if RenderLayer::usesCompositedScrolling() returned true
if the page would continue to behave correctly.  This is what
wkb.ug/94743 is intended to do.  Unfortunately, when we become a
composited layer, we switch from subpixel to grayscale anti-aliasing. We
only want to auto-opt into composited scrolling if we don't mind the
change in anti-aliasing, so we need a flag to enable/disable this
feature.

Source/WebCore:

No new tests -- no change in behaviour.

* page/Settings.h:
(WebCore::Settings::setAcceleratedCompositingForOverflowScrollEnabled):
(WebCore::Settings::acceleratedCompositingForOverflowScrollEnabled):
(Settings):

Source/WebKit/chromium:

* public/WebSettings.h:
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setAcceleratedCompositingForOverflowScrollEnabled):
(WebKit):
* src/WebSettingsImpl.h:
(WebSettingsImpl):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (128491 => 128492)


--- trunk/Source/WebCore/ChangeLog	2012-09-13 19:26:12 UTC (rev 128491)
+++ trunk/Source/WebCore/ChangeLog	2012-09-13 19:26:35 UTC (rev 128492)
@@ -1,3 +1,33 @@
+2012-09-13  Glenn Hartmann  <[email protected]>
+
+        Add new accelerated compositing for overflow scroll setting.
+        https://bugs.webkit.org/show_bug.cgi?id=95885
+
+        Reviewed by James Robinson.
+
+        wkb.ug/91117 introduces RenderLayer::usesCompositedScrolling(), which
+        currently returns true if we're overflow scrolling and the element has
+        been styled with '-webkit-overflow-scrolling: touch'. If this is true,
+        we get promoted to a composited layer, the associated RenderLayerBacking
+        gets special scrolling layers and in response to RenderLayer::scrollTo()
+        we no longer have to invalidate everything to get the scrolled content
+        in the right spot, thereby avoiding very expensive repaints. It's
+        unfortunate that we require -webkit-overflow-scrolling: touch, though.
+        It would be nice if RenderLayer::usesCompositedScrolling() returned true
+        if the page would continue to behave correctly.  This is what
+        wkb.ug/94743 is intended to do.  Unfortunately, when we become a
+        composited layer, we switch from subpixel to grayscale anti-aliasing. We
+        only want to auto-opt into composited scrolling if we don't mind the
+        change in anti-aliasing, so we need a flag to enable/disable this
+        feature.
+
+        No new tests -- no change in behaviour.
+
+        * page/Settings.h:
+        (WebCore::Settings::setAcceleratedCompositingForOverflowScrollEnabled):
+        (WebCore::Settings::acceleratedCompositingForOverflowScrollEnabled):
+        (Settings):
+
 2012-09-13  Joshua Bell  <[email protected]>
 
         IndexedDB: Consolidate two-phase connection to avoid race conditions

Modified: trunk/Source/WebCore/page/Settings.h (128491 => 128492)


--- trunk/Source/WebCore/page/Settings.h	2012-09-13 19:26:12 UTC (rev 128491)
+++ trunk/Source/WebCore/page/Settings.h	2012-09-13 19:26:35 UTC (rev 128492)
@@ -383,6 +383,9 @@
         void setAcceleratedCompositingForScrollableFramesEnabled(bool enabled) { m_acceleratedCompositingForScrollableFramesEnabled = enabled; }
         bool acceleratedCompositingForScrollableFramesEnabled() const { return m_acceleratedCompositingForScrollableFramesEnabled; }
 
+        void setAcceleratedCompositingForOverflowScrollEnabled(bool enabled) { m_acceleratedCompositingForOverflowScrollEnabled = enabled; }
+        bool acceleratedCompositingForOverflowScrollEnabled() const { return m_acceleratedCompositingForOverflowScrollEnabled; };
+
         void setShowDebugBorders(bool);
         bool showDebugBorders() const { return m_showDebugBorders; }
 
@@ -719,6 +722,7 @@
         bool m_downloadableBinaryFontsEnabled : 1;
         bool m_xssAuditorEnabled : 1;
         bool m_acceleratedCompositingEnabled : 1;
+        bool m_acceleratedCompositingForOverflowScrollEnabled : 1;
         bool m_acceleratedCompositingFor3DTransformsEnabled : 1;
         bool m_acceleratedCompositingForVideoEnabled : 1;
         bool m_acceleratedCompositingForPluginsEnabled : 1;

Modified: trunk/Source/WebKit/chromium/ChangeLog (128491 => 128492)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-09-13 19:26:12 UTC (rev 128491)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-09-13 19:26:35 UTC (rev 128492)
@@ -1,3 +1,33 @@
+2012-09-13  Glenn Hartmann  <[email protected]>
+
+        Add new accelerated compositing for overflow scroll setting.
+        https://bugs.webkit.org/show_bug.cgi?id=95885
+
+        Reviewed by James Robinson.
+
+        wkb.ug/91117 introduces RenderLayer::usesCompositedScrolling(), which
+        currently returns true if we're overflow scrolling and the element has
+        been styled with '-webkit-overflow-scrolling: touch'. If this is true,
+        we get promoted to a composited layer, the associated RenderLayerBacking
+        gets special scrolling layers and in response to RenderLayer::scrollTo()
+        we no longer have to invalidate everything to get the scrolled content
+        in the right spot, thereby avoiding very expensive repaints. It's
+        unfortunate that we require -webkit-overflow-scrolling: touch, though.
+        It would be nice if RenderLayer::usesCompositedScrolling() returned true
+        if the page would continue to behave correctly.  This is what
+        wkb.ug/94743 is intended to do.  Unfortunately, when we become a
+        composited layer, we switch from subpixel to grayscale anti-aliasing. We
+        only want to auto-opt into composited scrolling if we don't mind the
+        change in anti-aliasing, so we need a flag to enable/disable this
+        feature.
+
+        * public/WebSettings.h:
+        * src/WebSettingsImpl.cpp:
+        (WebKit::WebSettingsImpl::setAcceleratedCompositingForOverflowScrollEnabled):
+        (WebKit):
+        * src/WebSettingsImpl.h:
+        (WebSettingsImpl):
+
 2012-09-13  Joshua Bell  <[email protected]>
 
         IndexedDB: Consolidate two-phase connection to avoid race conditions

Modified: trunk/Source/WebKit/chromium/public/WebSettings.h (128491 => 128492)


--- trunk/Source/WebKit/chromium/public/WebSettings.h	2012-09-13 19:26:12 UTC (rev 128491)
+++ trunk/Source/WebKit/chromium/public/WebSettings.h	2012-09-13 19:26:35 UTC (rev 128492)
@@ -61,6 +61,7 @@
     virtual void setAcceleratedCompositingForAnimationEnabled(bool) = 0;
     virtual void setAcceleratedCompositingForCanvasEnabled(bool) = 0;
     virtual void setAcceleratedCompositingForFixedPositionEnabled(bool)  = 0;
+    virtual void setAcceleratedCompositingForOverflowScrollEnabled(bool) = 0;
     virtual void setAcceleratedCompositingForPluginsEnabled(bool) = 0;
     virtual void setAcceleratedCompositingForVideoEnabled(bool) = 0;
     virtual void setAcceleratedFiltersEnabled(bool) = 0;

Modified: trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp (128491 => 128492)


--- trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp	2012-09-13 19:26:12 UTC (rev 128491)
+++ trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp	2012-09-13 19:26:35 UTC (rev 128492)
@@ -428,6 +428,12 @@
     m_settings->setAcceleratedCompositingForVideoEnabled(enabled);
 }
 
+void WebSettingsImpl::setAcceleratedCompositingForOverflowScrollEnabled(
+    bool enabled)
+{
+    m_settings->setAcceleratedCompositingForOverflowScrollEnabled(enabled);
+}
+
 void WebSettingsImpl::setAcceleratedCompositingForPluginsEnabled(bool enabled)
 {
     m_settings->setAcceleratedCompositingForPluginsEnabled(enabled);

Modified: trunk/Source/WebKit/chromium/src/WebSettingsImpl.h (128491 => 128492)


--- trunk/Source/WebKit/chromium/src/WebSettingsImpl.h	2012-09-13 19:26:12 UTC (rev 128491)
+++ trunk/Source/WebKit/chromium/src/WebSettingsImpl.h	2012-09-13 19:26:35 UTC (rev 128492)
@@ -53,6 +53,7 @@
     virtual void setAcceleratedCompositingForAnimationEnabled(bool);
     virtual void setAcceleratedCompositingForCanvasEnabled(bool);
     virtual void setAcceleratedCompositingForFixedPositionEnabled(bool);
+    virtual void setAcceleratedCompositingForOverflowScrollEnabled(bool);
     virtual void setAcceleratedCompositingForPluginsEnabled(bool);
     virtual void setAcceleratedCompositingForVideoEnabled(bool);
     virtual void setAcceleratedFiltersEnabled(bool);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to