WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
232527
Factor out didDraw / didDrawEntireCanvas calls in canvas drawing functions
https://bugs.webkit.org/show_bug.cgi?id=232527
Summary
Factor out didDraw / didDrawEntireCanvas calls in canvas drawing functions
Cameron McCormack (:heycam)
Reported
2021-10-30 00:08:57 PDT
There are various canvas drawing functions in CanvasRenderingContext2DBase that end similarly: ``` if (isEntireBackingStoreDirty()) didDraw(std::nullopt); else if (repaintEntireCanvas) didDrawEntireCanvas(); else didDraw(... some rect calculation ...); ``` We can factor out the commonality.
Attachments
Patch
(8.36 KB, patch)
2021-10-30 00:13 PDT
,
Cameron McCormack (:heycam)
no flags
Details
Formatted Diff
Diff
Patch for landing
(2.72 KB, patch)
2021-11-04 20:34 PDT
,
Cameron McCormack (:heycam)
no flags
Details
Formatted Diff
Diff
Patch for landing
(8.37 KB, patch)
2021-11-04 21:08 PDT
,
Cameron McCormack (:heycam)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-10-30 00:09:25 PDT
<
rdar://problem/84834950
>
Cameron McCormack (:heycam)
Comment 2
2021-10-30 00:13:41 PDT
Created
attachment 442904
[details]
Patch
Antti Koivisto
Comment 3
2021-11-04 00:00:26 PDT
Comment on
attachment 442904
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=442904&action=review
> Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:1065 > + return path.fastBoundingRect();
I suppose this is the case where computing the rect is expensive? (thus the lambda)
Cameron McCormack (:heycam)
Comment 4
2021-11-04 00:10:57 PDT
(In reply to Antti Koivisto from
comment #3
)
> > Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:1065 > > + return path.fastBoundingRect(); > > I suppose this is the case where computing the rect is expensive? (thus the > lambda)
I imagine so. I didn't measure. But I know Simon was careful previously not to compute it if not needed.
EWS
Comment 5
2021-11-04 00:12:39 PDT
Tools/Scripts/svn-apply failed to apply
attachment 442904
[details]
to trunk. Please resolve the conflicts and upload a new patch.
Cameron McCormack (:heycam)
Comment 6
2021-11-04 20:34:15 PDT
Created
attachment 443371
[details]
Patch for landing
Cameron McCormack (:heycam)
Comment 7
2021-11-04 21:08:37 PDT
Created
attachment 443374
[details]
Patch for landing
EWS
Comment 8
2021-11-04 21:52:48 PDT
Committed
r285334
(
243897@main
): <
https://commits.webkit.org/243897@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 443374
[details]
.
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