<AWT Dev> RFR: 8182043: Access to Windows Large Icons [v3]
aivanov at openjdk.java.net
Fri Apr 30 20:57:02 UTC 2021
On Wed, 10 Mar 2021 20:53:43 GMT, Alexey Ivanov <aivanov at 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-jdk at 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.
More information about the awt-dev