Hi, Semyon.
The responsibility for sorting of an array was intentionally moved to
the user, because the getResolutionVariant method () is called in each
draw of the image. For this purpose in documentation for a class and in
a documentation for constructors it was specified that the array shall
be sorted. It is the reason why the bug of JDK-8147849 was closed.
RFE which you try to fix cover another use-case:
If the user will use the sorted array [@1 ,@20] then we should select
@1 if "-Dsun.java2d.uiScale=2" is used but not @20
On 9/6/17 19:31, Semyon Sadetsky wrote:
Hello,
Please review fix for JDK10:
bug: https://bugs.openjdk.java.net/browse/JDK-8148619
webrev: http://cr.openjdk.java.net/~ssadetsky/8148619/webrev.00/
The algorithm selecting the best resolution variant of the
BaseMultiResolutionImage was updated to be insensitive to the order of
image variants in the initially provided array.
The BaseMultiResolutionImage specification was updated correspondingly.
--Semyon
--
Best regards, Sergey.