Bug 265149

Summary: Use 'rotateRadians' in CanvasRenderingContext2DBase.cpp
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: CanvasAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2023-11-20 09:53:12 PST
Hi Team,

We merged Blink's patch to have 'rotateRadians' rather than multiple conversions, we can use it here as well:

https://searchfox.org/wubkat/source/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp#784

^ From 'newTransform.rotate(angleInRadians / piDouble * 180.0);' to 'newTransform.rotateRadians(angleInRadians);'

https://searchfox.org/wubkat/source/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp#792

^ From 'm_path.transform(AffineTransform().rotate(-angleInRadians / piDouble * 180.0));' to 'm_path.transform(AffineTransform().rotateRadians(-angleInRadians));'

It is just to use the function more and more.

Thanks!
Comment 1 EWS 2023-11-20 17:53:53 PST
Committed 270994@main (1df0b1914071): <https://commits.webkit.org/270994@main>

Reviewed commits have been landed. Closing PR #20754 and removing active labels.
Comment 2 Radar WebKit Bug Importer 2023-11-20 17:54:14 PST
<rdar://problem/118666924>