WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
246822
Add the class FilterTargetSwitcher
https://bugs.webkit.org/show_bug.cgi?id=246822
Summary
Add the class FilterTargetSwitcher
Said Abou-Hallawa
Reported
2022-10-20 12:22:08 PDT
This will manage applying a filter to a certain area of drawings with the minimum changes in the existing code. All it needs is a set of callbacks in the existing caller class. And the caller can either add this line of code to the drawing function: FilterTargetSwitcher targetSwitcher(*this, bounds); Or a line like this one if calculating the bounds is expensive: FilterTargetSwitcher targetSwitcher(*this, []() { return path.fastBoundingRect(); }); The constructor of FilterTargetSwitcher will ask the client if there a filter to apply or not. If there is a filter, it will switch the drawing to a temporary ImageBuffer. The client has to make sure all the drawing code from now on will use the context of this ImageBuffer. The destructor will apply the filter to the temporary ImageBuffer and then composite filtered ImageBuffer to the client drawing context.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-10-20 12:30:34 PDT
<
rdar://problem/101394417
>
Said Abou-Hallawa
Comment 2
2022-10-20 12:31:42 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/5596
EWS
Comment 3
2022-10-20 14:29:12 PDT
Committed
255802@main
(5a02a23fcd77): <
https://commits.webkit.org/255802@main
> Reviewed commits have been landed. Closing PR #5596 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug