RFR: 8280861: Robot color picker broken on Linux with scaling above 100% [v3]

Maxim Kartashev duke at openjdk.java.net
Tue Feb 15 05:28:14 UTC 2022


On Tue, 15 Feb 2022 00:43:42 GMT, Phil Race <prr at openjdk.org> wrote:

>> Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Updated copyright date in TestJProgressBarHighlightColor.java
>
> src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c line 2867:
> 
>> 2865: 
>> 2866: inline static int scale_down_to_plus_inf(int what, int scale) {
>> 2867:     return (int)ceilf(what / (float)scale);
> 
> I find the name of this and the companion function confusing.
> what is "inf" short for ? I see that and I think plus_infinity.
> scaled_ceiling and scaled_floor might be better names based on what I see.

Right, "inf" is for infinity; this is sort of how the rounding modes are described in the IEEE754 standard. But since full length words make the function name too long and short versions are confusing, I will rename as you suggested.

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

PR: https://git.openjdk.java.net/jdk/pull/7425



More information about the client-libs-dev mailing list