Bug 201381 - Make "clips compositing descendants" an indirect compositing reason
Summary: Make "clips compositing descendants" an indirect compositing reason
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Compositing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-31 13:28 PDT by Simon Fraser (smfr)
Modified: 2019-09-03 12:50 PDT (History)
5 users (show)

See Also:


Attachments
Patch (11.91 KB, patch)
2019-08-31 13:30 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (12.05 KB, patch)
2019-09-02 10:00 PDT, Simon Fraser (smfr)
koivisto: review+
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-08-31 13:28:23 PDT
Make "clips compositing descendants" an indirect compositing reason
Comment 1 Simon Fraser (smfr) 2019-08-31 13:30:46 PDT
Created attachment 377805 [details]
Patch
Comment 2 Sam Weinig 2019-08-31 15:52:45 PDT
Comment on attachment 377805 [details]
Patch

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

> Source/WebCore/ChangeLog:10
> +
> +        Whether a layer has to composite to clip composited descendants is an "indirect" reason,
> +        just like having to composite for filters if there's a composited descendant. So add
> +        IndirectCompositingReason::Clipping, and have computeIndirectCompositingReason() compute this.

What is the goal/benefit of computing this?
Comment 3 Simon Fraser (smfr) 2019-08-31 16:12:30 PDT
(In reply to Sam Weinig from comment #2)
> Comment on attachment 377805 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=377805&action=review
> 
> > Source/WebCore/ChangeLog:10
> > +
> > +        Whether a layer has to composite to clip composited descendants is an "indirect" reason,
> > +        just like having to composite for filters if there's a composited descendant. So add
> > +        IndirectCompositingReason::Clipping, and have computeIndirectCompositingReason() compute this.
> 
> What is the goal/benefit of computing this?

We already compute this. This patch is some cleanup prior to fixing bug 201330.
Comment 4 Sam Weinig 2019-09-01 17:36:42 PDT
(In reply to Simon Fraser (smfr) from comment #3)
> (In reply to Sam Weinig from comment #2)
> > Comment on attachment 377805 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=377805&action=review
> > 
> > > Source/WebCore/ChangeLog:10
> > > +
> > > +        Whether a layer has to composite to clip composited descendants is an "indirect" reason,
> > > +        just like having to composite for filters if there's a composited descendant. So add
> > > +        IndirectCompositingReason::Clipping, and have computeIndirectCompositingReason() compute this.
> > 
> > What is the goal/benefit of computing this?
> 
> We already compute this. This patch is some cleanup prior to fixing bug
> 201330.

Ok. Can you add that to the ChangeLog?
Comment 5 Simon Fraser (smfr) 2019-09-02 10:00:15 PDT
Created attachment 377854 [details]
Patch
Comment 6 Antti Koivisto 2019-09-03 11:13:01 PDT
Comment on attachment 377854 [details]
Patch

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

> Source/WebCore/rendering/RenderLayerCompositor.cpp:3069
> +    return IndirectCompositingReason::None;

Would be nice to modernise this to use Optional/OptionSet at some point.
Comment 7 Simon Fraser (smfr) 2019-09-03 12:49:18 PDT
https://trac.webkit.org/changeset/249434/webkit
Comment 8 Radar WebKit Bug Importer 2019-09-03 12:50:18 PDT
<rdar://problem/54986805>