RESOLVED FIXED Bug 95885
Add new accelerated compositing for overflow scroll setting.
https://bugs.webkit.org/show_bug.cgi?id=95885
Summary Add new accelerated compositing for overflow scroll setting.
Glenn Hartmann
Reported 2012-09-05 12:51:07 PDT
This setting is required for 94743
Attachments
Patch (3.48 KB, patch)
2012-09-05 12:57 PDT, Glenn Hartmann
no flags
Patch (9.59 KB, patch)
2012-09-06 08:03 PDT, Glenn Hartmann
no flags
Patch (6.81 KB, patch)
2012-09-07 11:02 PDT, Glenn Hartmann
no flags
Patch (6.61 KB, patch)
2012-09-07 11:26 PDT, Glenn Hartmann
no flags
Patch (7.73 KB, patch)
2012-09-07 12:57 PDT, Glenn Hartmann
no flags
Patch (8.00 KB, patch)
2012-09-13 10:08 PDT, Glenn Hartmann
no flags
Patch (7.67 KB, patch)
2012-09-13 11:44 PDT, Glenn Hartmann
no flags
Glenn Hartmann
Comment 1 2012-09-05 12:57:29 PDT
WebKit Review Bot
Comment 2 2012-09-05 12:59:59 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
WebKit Review Bot
Comment 3 2012-09-05 13:00:17 PDT
Attachment 162311 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/Platform/ChangeLog', u'Source/Platf..." exit_code: 1 Source/WebCore/ChangeLog:8: Line contains tab character. [whitespace/tab] [5] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
James Robinson
Comment 4 2012-09-05 13:01:30 PDT
Comment on attachment 162311 [details] Patch What does this do?
Glenn Hartmann
Comment 5 2012-09-06 08:03:48 PDT
Created attachment 162508 [details] Patch (In reply to comment #4) > (From update of attachment 162311 [details]) > What does this do? This is to turn on Ian's feature from https://bugs.webkit.org/show_bug.cgi?id=94743.
Dana Jansens
Comment 6 2012-09-06 08:29:57 PDT
Comment on attachment 162508 [details] Patch If you don't want review, you can just upload with --no-review, which won't set the "R?" flag. You don't need to stick anything in the bug title. :)
Dana Jansens
Comment 7 2012-09-06 08:34:15 PDT
Oh sorry, and I guess you removed it from the title. If you want review you can set the R? flag again.
James Robinson
Comment 8 2012-09-06 09:49:07 PDT
(In reply to comment #5) > Created an attachment (id=162508) [details] > Patch > > (In reply to comment #4) > > (From update of attachment 162311 [details] [details]) > > What does this do? > > This is to turn on Ian's feature from https://bugs.webkit.org/show_bug.cgi?id=94743. That's far from an explanation. What *is* the feature?
James Robinson
Comment 9 2012-09-06 10:52:23 PDT
Comment on attachment 162508 [details] Patch This still makes no sense. What is it supposed to do?
vollick
Comment 10 2012-09-06 10:58:33 PDT
(In reply to comment #9) > (From update of attachment 162508 [details]) > This still makes no sense. What is it supposed to do? Some more context on composited scrolling. 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 setting to enable/disable this feature.
James Robinson
Comment 11 2012-09-06 11:06:34 PDT
In that case this should not touch any compositor files (WebLayerTre...), etc. It's purely a WebCore setting that maps to compositor triggers.
Glenn Hartmann
Comment 12 2012-09-07 11:02:17 PDT
Created attachment 162819 [details] Patch (In reply to comment #4) > (From update of attachment 162311 [details]) > What does this do? This is to turn on Ian's feature from https://bugs.webkit.org/show_bug.cgi?id=94743.
Dana Jansens
Comment 13 2012-09-07 11:10:09 PDT
Comment on attachment 162819 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=162819&action=review > Source/Platform/ChangeLog:3 > + [chromium] Add new force composited scrolling setting. Can you make the bug title (and changelog) match the setting you're adding again, ie "Accelerated Overflow Scroll"? > Source/WebKit/chromium/ChangeLog:3 > + [chromium] NOT FOR REVIEW Add new force composited scrolling setting. This needs to be fixed also.
Glenn Hartmann
Comment 14 2012-09-07 11:26:20 PDT
James Robinson
Comment 15 2012-09-07 12:19:52 PDT
Comment on attachment 162829 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=162829&action=review > Source/Platform/ChangeLog:13 > + * chromium/public/WebTransformOperations.h: > + (WebTransformOperations): > + * chromium/public/WebTransformationMatrix.h: > + (WebTransformationMatrix): Are you really patching WebTransformOperations and WebTransformationMatrix? I think you need to regenerate changelogs (or at least delete this entry) > Source/WebCore/ChangeLog:8 > + Add new accelerated overflow scroll setting, as required for 94743. This isn't really describing anything. You should say what this setting does and what it's for (and "for 94743" does not explain anything). > Source/WebCore/page/Settings.h:127 > + void setEnableAcceleratedOverflowScroll(bool); This should follow the other compositor trigger settings and be close to them. For example: setAcceleratedCompositingForFixedPositionEnabled setAcceleratedCompositingForScrollableFramesEnabled etc
James Robinson
Comment 16 2012-09-07 12:24:03 PDT
This patch does non-chromium code.
Glenn Hartmann
Comment 17 2012-09-07 12:57:14 PDT
James Robinson
Comment 18 2012-09-11 14:45:38 PDT
Comment on attachment 162848 [details] Patch Why is this name inconsistent with all of the other compositing triggers?
vollick
Comment 19 2012-09-12 13:27:13 PDT
(In reply to comment #18) > (From update of attachment 162848 [details]) > Why is this name inconsistent with all of the other compositing triggers? In 94743, I've added Settings::acceleratedCompositingForOverflowScrollEnabled to match the other settings. Admittedly, it's still hard to tell from the name of the flag what it actually does, but I'm having a hard time coming up with a name that's consistent with the other flags and is still descriptive enough. automaticallyOptIntoCompositedScrollingEnabled is more descriptive, I think, but not consistent. If you have an idea of a name that could work, please let me know. In any case, perhaps we should continue the discussion regarding the name of the flag on 94743, and Glenn can use whatever name we decide in these plumbing patches?
James Robinson
Comment 20 2012-09-12 13:38:53 PDT
This setting appears to be a compositor trigger, so let's name it like one. Specifically from what I can tell this does NOT change scrolling behavior or overflow behavior at all. All it does is change which elements get promoted into a compositing layer. That's what compositor triggers are.
vollick
Comment 21 2012-09-12 13:54:31 PDT
(In reply to comment #20) > This setting appears to be a compositor trigger, so let's name it like one. Specifically from what I can tell this does NOT change scrolling behavior or overflow behavior at all. All it does is change which elements get promoted into a compositing layer. That's what compositor triggers are. Right. Specifically, the elements that get promoted are overflow-scrollable divs that can safely (i.e., without breaking stacking order) establish a stacking context. So in light of this, and the names of the other compositor triggers, my thoughts are: acceleratedCompositingForOverflowScrollEnabled, or the more verbose but descriptive accelaretedCompositingForOverflowScrollableDivsThatCanSafelyEstablishStackingContextsEnabled Do either of these sound acceptable?
James Robinson
Comment 22 2012-09-12 14:43:04 PDT
The first. We can only promote layers that are stacking contexts, so that part is redundant.
Glenn Hartmann
Comment 23 2012-09-13 10:08:35 PDT
Glenn Hartmann
Comment 24 2012-09-13 10:10:06 PDT
Changed the name to acceleratedCompositingForOverflowScrollEnabled to make this more consistent with other compositor triggers. Please take a look.
James Robinson
Comment 25 2012-09-13 10:49:41 PDT
Comment on attachment 163898 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=163898&action=review R=me but you have some more consistency issues to fix. > Source/WebCore/page/Settings.cpp:465 > + m_acceleratedCompositingForOverflowScrollEnabled = enable; put this inline like the other setAcceleratedCompositing... functions in Settings.h > Source/WebCore/page/Settings.h:666 > + bool m_acceleratedCompositingForOverflowScrollEnabled : 1; Move this down next to the other m_acceleratedCompositing.. bits > Source/WebKit/chromium/public/WebSettings.h:140 > + virtual void setAcceleratedCompositingForOverflowScrollEnabled(bool) = 0; Put this next to the other setAccelerated... setters up around lines 6067. Notice how the rest of this file is alphabetical? > Source/WebKit/chromium/src/WebSettingsImpl.cpp:390 > +void WebSettingsImpl::setAcceleratedCompositingForOverflowScrollEnabled( Move the implementation of this to match the header order > Source/WebKit/chromium/src/WebSettingsImpl.h:135 > + virtual void setAcceleratedCompositingForOverflowScrollEnabled(bool); Alphabetize
Glenn Hartmann
Comment 26 2012-09-13 11:44:16 PDT
WebKit Review Bot
Comment 27 2012-09-13 12:26:17 PDT
Comment on attachment 163922 [details] Patch Clearing flags on attachment: 163922 Committed r128492: <http://trac.webkit.org/changeset/128492>
WebKit Review Bot
Comment 28 2012-09-13 12:26:22 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.