Bug 236574 - [GPU Process] CSSFilter should be created only at the painting time
Summary: [GPU Process] CSSFilter should be created only at the painting time
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks: 236573
  Show dependency treegraph
 
Reported: 2022-02-13 16:21 PST by Said Abou-Hallawa
Modified: 2022-04-04 19:07 PDT (History)
16 users (show)

See Also:


Attachments
Patch (37.92 KB, patch)
2022-02-13 16:50 PST, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (37.12 KB, patch)
2022-02-13 21:04 PST, Said Abou-Hallawa
simon.fraser: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (63.05 KB, patch)
2022-03-28 14:22 PDT, Said Abou-Hallawa
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (64.02 KB, patch)
2022-03-28 16:09 PDT, Said Abou-Hallawa
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (64.38 KB, patch)
2022-03-29 00:16 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (65.75 KB, patch)
2022-04-04 14:00 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2022-02-13 16:21:21 PST
CSSFilter::create() is called twice: 

(1) while doing the layout and creating the page layers. This call is mainly for calculating the filter outsets which is used for layer clipping. In this case we do not have a GraphicsContext
(2) while painting in RenderLayerFilters::beginFilterEffect(). In this case we do have a GraphicsContext

Building whole filter chain just to calculate the filter outsets is wrong. Instead we can use the FilterOperation and SVGFilterPrimitiveStandardAttributes superclasses to get their outsets without having to build the FilterEffects.
Comment 1 Said Abou-Hallawa 2022-02-13 16:50:44 PST
Created attachment 451846 [details]
Patch
Comment 2 Said Abou-Hallawa 2022-02-13 21:04:46 PST
Created attachment 451858 [details]
Patch
Comment 3 Simon Fraser (smfr) 2022-02-14 13:16:06 PST
Comment on attachment 451858 [details]
Patch

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

> Source/WebCore/rendering/RenderLayerFilters.h:77
> +    RenderingMode m_renderingMode;

Let's default-initialize this.
Comment 4 Radar WebKit Bug Importer 2022-02-20 16:22:17 PST
<rdar://problem/89210004>
Comment 5 Said Abou-Hallawa 2022-03-28 14:22:33 PDT
Created attachment 455955 [details]
Patch
Comment 6 Said Abou-Hallawa 2022-03-28 16:09:17 PDT
Created attachment 455965 [details]
Patch
Comment 7 Said Abou-Hallawa 2022-03-29 00:16:34 PDT
Created attachment 456001 [details]
Patch
Comment 8 Said Abou-Hallawa 2022-04-04 14:00:52 PDT
Created attachment 456626 [details]
Patch
Comment 9 EWS 2022-04-04 19:07:38 PDT
Committed r292364 (249229@main): <https://commits.webkit.org/249229@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 456626 [details].