[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] RFR: 8182043: Access to Windows Large Icons [v3]
From:       Alexey Ivanov <aivanov () openjdk ! java ! net>
Date:       2021-04-30 20:57:02
Message-ID: Y3RxEEuNULy0pkHrOD9gPtkhxLB-_ZLP2odypc1hxmM=.71988167-db77-4bfa-bdcc-6aab04b61ac8 () github ! com
[Download RAW message or body]

On Wed, 10 Mar 2021 20:53:43 GMT, Alexey Ivanov <aivanov@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@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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic