Bug 262718

Summary: Introduce 'rotateRadians' helper function and use across WebKit
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, mattwoodrow, simon.fraser, vitor.roriz, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2023-10-05 12:39:09 PDT
Hi Team,

While going through Blink commits, I came across a helper, which reduces few multiplication etc.

Blink Commit: https://src.chromium.org/viewvc/blink?view=revision&revision=167603 (Helper function) and https://src.chromium.org/viewvc/blink?revision=168929&view=revision (Use in Canvas etc.)

___

If we add new rotateRadians function, we will be able to reduce unnecessary operations.

 Before : rad -> rad2deg -> deg2rad -> calc sinNcos
 After  : rad                       -> calc sinNcos

As a result, we can reduce two multiplication and two division.

___

It benefits by doing above.

So just wanted to raise, so I can do PR.

Thanks!
Comment 1 EWS 2023-10-05 20:50:53 PDT
Committed 268964@main (3f64447f2aa9): <https://commits.webkit.org/268964@main>

Reviewed commits have been landed. Closing PR #18712 and removing active labels.
Comment 2 Radar WebKit Bug Importer 2023-10-05 20:51:15 PDT
<rdar://problem/116558684>