RFR: 8282526: Default icon is not painted properly [v4]

Sergey Bylokhov serb at openjdk.java.net
Fri Jun 3 21:52:53 UTC 2022


On Fri, 3 Jun 2022 21:46:29 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>>> But can we use it as a backup if the system does not return the expected size on the initial/current call?
>> 
>> No, because in case when current implementation returns bad results this function also returns incorrect results so it is hardly a backup.
>
>> Because for some files - and we can not predict which files these are - function will always return set of 16x16 and 32x32 icons - no matter what we request. For the icons that return proper sizes we do request exact sizes and use them.
> 
> How do we request the proper size for the example above when the scale is 1.25 and the "small" image? The requested size should be 20x20 but we will request 16x16 or 32x32 and then upscale/downscale, no?

> No, because in case when current implementation returns bad results this function also returns incorrect results so it is hardly a backup.

Are you sure? That article said the opposite and suggest to use SHDefExtractIcon if the simple extract fails. Probably we should recheck why it does not work for your old testing it seems this should be even faster since it read only one image instead of small+large.

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

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



More information about the client-libs-dev mailing list