[OpenJDK 2D-Dev] [9] Review request for 8151303 [macosx] [hidpi] JButton's low-res. icon is visible when clicking on it

Jim Graham james.graham at oracle.com
Fri Mar 11 20:15:55 UTC 2016


Is this tied in with ImageFilter/FilteredImageSource?

It looks like since FIS takes only a Producer, it has lost the handle to 
the image to get a source for a particular resolution.  What happens if 
we introduce MultiResolution[Image]Producer?  It would provide a single 
method that would mimic <OriginalImage>.getRV().getProducer()?

I imagine this would greatly complicate the internals of ToolkitImage to 
support this, though...

			...jim

On 3/11/16 5:42 AM, Alexander Scherbatiy wrote:
> On 09/03/16 16:58, Sergey Bylokhov wrote:
>> Probably we should enhance ImageProducer/Tk.createImage/ImageFilter to
>> support this functionality? It seems that the number of usage of this
>> check "image instanceof MultiResolutionImage" will grow over time.
>     ImageProducer produces pixels for an image and is not able to take
> an information about the image resolution variants.
>
>   May be we can add Toolkit.createImage(Image image, ImageFilter
> imageFilter) method which takes MultiResolutionImage into account to
> cover the common case where filtered image is created.
>
>   Thanks,
>   Alexandr.
>> I think that at least our own API should support MultiResolutionImage
>> w/o such checks, otherwise the user will need to do the same.
>>
>> cc 2d-dev
>>
>> On 09.03.16 15:30, Alexander Scherbatiy wrote:
>>>
>>> Hello,
>>>
>>> Could you review the fix:
>>>    bug: https://bugs.openjdk.java.net/browse/JDK-8151303
>>>    webrev: http://cr.openjdk.java.net/~alexsch/8151303/webrev.00
>>>
>>>    The AquaUtils does not take into account MultiResolutionImage for
>>> selected/disabled/lightened images generation.
>>>    The fix also leaves the MultiResolutionCachedImage check because the
>>> base system icon size can be differ from the requested painted size.
>>>
>>>    Thanks,
>>>    Alexandr.
>>
>>
>



More information about the 2d-dev mailing list