Bug 265149 - Use 'rotateRadians' in CanvasRenderingContext2DBase.cpp
Summary: Use 'rotateRadians' in CanvasRenderingContext2DBase.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-20 09:53 PST by Ahmad Saleem
Modified: 2023-11-20 17:54 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>