RFR: 8346281: [Windows] RenderScale doesn't update to HiDPI changes
Andy Goryachev
angorya at openjdk.org
Thu Nov 6 19:11:21 UTC 2025
On Thu, 6 Nov 2025 18:58:15 GMT, Jose Pereda <jpereda at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/native-glass/win/GlassWindow.cpp line 824:
>>
>>> 822: {
>>> 823: JNIEnv* env = GetEnv();
>>> 824: float scale = (float) LOWORD(wParam) / (float) USER_DEFAULT_SCREEN_DPI;
>>
>> could we simply declare `USER_DEFAULT_SCREEN_DPI` to be a `float`?
>
> 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! :-)
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1964#discussion_r2500455779
More information about the openjfx-dev
mailing list