On Wed, 10 Mar 2021 20:53:43 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>> Alexander Zuev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Update src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp
>>   
>>   Select one icon at a time.
>>   
>>   Co-authored-by: Alexey Ivanov 
>> <70774172+aivanov-...@users.noreply.github.com>
>
> src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java line 
> 1146:
> 
>> 1144:             }
>> 1145:             Map<Integer, Image> multiResolutionIcon = new HashMap<>();
>> 1146:             int start = size > MAX_QUALITY_ICON ? 
>> ICON_RESOLUTIONS.length - 1 : 0;
> 
> Does it make sense to always start at zero?
> The icons of smaller size will never be used, will they?
> Thus it's safe to start at the index which corresponds to the requested size 
> if `size` matches, or the index such as `ICON_RESOLUTIONS[index] < size && 
> ICON_RESOLUTIONS[index + 1] > size`.

This comment is also about the case of not fetching icons of sizes smaller than 
requested size.

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

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

Reply via email to