Bug 197694 - Event region generation needs to know about backing-sharing
Summary: Event region generation needs to know about backing-sharing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Compositing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antti Koivisto
URL:
Keywords: InRadar
Depends on:
Blocks: 197561
  Show dependency treegraph
 
Reported: 2019-05-08 10:01 PDT by Simon Fraser (smfr)
Modified: 2019-05-10 17:53 PDT (History)
5 users (show)

See Also:


Attachments
patch (2.94 KB, patch)
2019-05-10 00:39 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (6.05 KB, patch)
2019-05-10 01:10 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2019-05-08 10:01:02 PDT
When we use backing-store sharing for composting, event region generation also needs to run code to get shared layers to produce event regions.

This will fix fast/scrolling/ios/overflow-scroll-overlap-4.html
Comment 1 Simon Fraser (smfr) 2019-05-08 10:02:43 PDT
For now I'll mark this as a test failure in TestExpectations.
Comment 2 Radar WebKit Bug Importer 2019-05-08 10:03:10 PDT
<rdar://problem/50584991>
Comment 3 Radar WebKit Bug Importer 2019-05-08 10:03:13 PDT
<rdar://problem/50584994>
Comment 4 Antti Koivisto 2019-05-10 00:39:52 PDT
Created attachment 369547 [details]
patch
Comment 5 Antti Koivisto 2019-05-10 01:10:30 PDT
Created attachment 369548 [details]
patch
Comment 6 Anders Carlsson 2019-05-10 07:17:26 PDT
Comment on attachment 369548 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=369548&action=review

> Source/WebCore/rendering/RenderLayerBacking.cpp:1497
> +    for (auto& layerWeakPtr : m_backingSharingLayers)
> +        layerWeakPtr->paintLayerContents(nullContext, paintingInfo, paintFlags);

Do you need to null check layerWeakPtr here?
Comment 7 Antti Koivisto 2019-05-10 08:45:18 PDT
> Do you need to null check layerWeakPtr here?

Nah, weakptrs in this code are just for safety, the logic should guarantee they won't be null here.
Comment 8 Simon Fraser (smfr) 2019-05-10 08:48:16 PDT
Comment on attachment 369548 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=369548&action=review

>> Source/WebCore/rendering/RenderLayerBacking.cpp:1497
>> +        layerWeakPtr->paintLayerContents(nullContext, paintingInfo, paintFlags);
> 
> Do you need to null check layerWeakPtr here?

No, we think that's a correctness bug and are OK with a null-deref crash.

However, this code will be wrong when the sharing layers have transforms. Please file a follow-up bug to fix that. You'll need to use something like I'm adding in bug 197692.
Comment 9 WebKit Commit Bot 2019-05-10 09:20:18 PDT
Comment on attachment 369548 [details]
patch

Clearing flags on attachment: 369548

Committed r245175: <https://trac.webkit.org/changeset/245175>
Comment 10 WebKit Commit Bot 2019-05-10 09:20:20 PDT
All reviewed patches have been landed.  Closing bug.