<AWT Dev> [8] Review request for 8028212 Custom cursor HiDPI support
Anthony Petrov
anthony.petrov at oracle.com
Tue Dec 3 09:06:45 PST 2013
Hi Alexander,
If we go with this fix, I suggest to move the
CImage.Creator.resizeImageRepresentations() to the CImage class and make
it a member method, so that you don't need to pass a CImage reference to
it as an argument.
Also, there's the CImage.resize() method already. Why does it not work
for us? Having a specification for both methods (or for one, if the
second is unneeded) might be helpful.
However, I'm not sure if we really want to resize each representation of
an NSImage object to the same size. Why would we want to do that? In
fact, one of the representations might already have the correct size,
and we could use just that whenever we need it w/o wasting resources on
resizing each of them. If there's no representations of suitable size,
then we should choose the closest one and resize just it to the desired
size. Or am I misunderstanding anything?
Also, in CCustomCursor.getImageData(), could we somehow encapsulate a
part (or all) of the Image vs. MultiResolutionImage logic in the
CImage.Creator class?
PS. I'm not really an expert in Image handling code. I'd suggest someone
from the 2D team to review this as well. Maybe Jim could help?
--
best regards,
Anthony
On 12/03/2013 08:32 PM, Alexander Scherbatiy wrote:
>
> Hello,
>
> Could you review the fix:
> bug: https://bugs.openjdk.java.net/browse/JDK-8028212
> webrev: http://cr.openjdk.java.net/~alexsch/8028212/webrev.00
>
> - MultiResolutionImage interface is used from the fix 8011059
> - NSImage with representations are created for the multi-resolution
> cursor
> - NSImage representations are rescaled to the base cursor size
>
> Thanks,
> Alexandr.
>
More information about the awt-dev
mailing list