RFR: 8346281: [Windows] RenderScale doesn't update to HiDPI changes

Kevin Rushforth kcr at openjdk.org
Thu Nov 6 19:18:19 UTC 2025


On Thu, 6 Nov 2025 19:08:24 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> No need, I've removed the casting, it wasn't needed.
>
> if you declare this constant as float, you won't have to cast and it won't be converted each time it's used.  saves 0.3 nanoseconds!  :-)

The cast will almost certainly be done at compile time, so it is fine as is.

More importantly, I see that the constant is in an `ifndef`. Presuming that if the constant exists in the header file, it would be defined as an int, it would be wrong to define it as a float in the ifndef case.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1964#discussion_r2500482084


More information about the openjfx-dev mailing list