RESOLVED FIXED 201487
Generate event region for both the main graphics layer and the scrolled contents layer
https://bugs.webkit.org/show_bug.cgi?id=201487
Summary Generate event region for both the main graphics layer and the scrolled conte...
Antti Koivisto
Reported 2019-09-04 19:42:28 PDT
We currently generate region for one of them only. With borders both need it.
Attachments
patch (10.58 KB, patch)
2019-09-04 19:46 PDT, Antti Koivisto
simon.fraser: review+
patch (11.05 KB, patch)
2019-09-05 09:54 PDT, Antti Koivisto
no flags
patch (11.05 KB, patch)
2019-09-05 10:25 PDT, Antti Koivisto
no flags
patch (10.53 KB, patch)
2019-09-05 10:31 PDT, Antti Koivisto
no flags
Antti Koivisto
Comment 1 2019-09-04 19:46:26 PDT
Simon Fraser (smfr)
Comment 2 2019-09-04 20:24:39 PDT
Comment on attachment 378041 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=378041&action=review Are there behavioral changes from using RenderLayerBacking::paintIntoLayer() now that can be tested? > Source/WebCore/rendering/RenderLayerBacking.cpp:1601 > + auto clipRect = enclosingIntRect(compositedBounds()); Isn't this wrong for the scrolled contents? You need to expand the clip there. An issue with generating the event region for the entire scrolled contents is that you're potentially traversing a massive render tree, most of which is not visible. Ideally we'd generate event regions for areas with live tiles only. > Source/WebCore/rendering/RenderLayerBacking.cpp:1604 > + auto layerOffset = toIntSize(graphicsLayer.scrollOffset()) - roundedIntSize(graphicsLayer.offsetFromRenderer()); I think it would be a bit nicer to pass in the data to apply the scrolling offset. I don't really like GraphicsLayers knowing about scrolling.
Antti Koivisto
Comment 3 2019-09-05 09:46:40 PDT
(In reply to Simon Fraser (smfr) from comment #2) > Comment on attachment 378041 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=378041&action=review > > Are there behavioral changes from using RenderLayerBacking::paintIntoLayer() > now that can be tested? > > > Source/WebCore/rendering/RenderLayerBacking.cpp:1601 > > + auto clipRect = enclosingIntRect(compositedBounds()); > > Isn't this wrong for the scrolled contents? You need to expand the clip > there. Fixed this to provide the layer size as the dirty rect (it worked before in common cases because the dirty rect is mostly ignored). > An issue with generating the event region for the entire scrolled contents > is that you're potentially traversing a massive render tree, most of which > is not visible. Ideally we'd generate event regions for areas with live > tiles only. On the other hand we won't need to update the event region during scrolling if we generate it all at once (separate invalidation bit will enable that).
Antti Koivisto
Comment 4 2019-09-05 09:54:37 PDT
Antti Koivisto
Comment 5 2019-09-05 10:25:22 PDT
Antti Koivisto
Comment 6 2019-09-05 10:31:27 PDT
WebKit Commit Bot
Comment 7 2019-09-05 11:03:24 PDT
Comment on attachment 378094 [details] patch Clearing flags on attachment: 378094 Committed r249536: <https://trac.webkit.org/changeset/249536>
WebKit Commit Bot
Comment 8 2019-09-05 11:03:26 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9 2019-09-05 11:04:17 PDT
Note You need to log in before you can comment on or make changes to this bug.