<AWT Dev> [8] Review request for 8011059 [macosx] Make JDK demos look perfect on retina displays
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Wed Nov 13 13:55:37 PST 2013
Hello, Jim.
On 13.11.2013 22:49, Jim Graham wrote:
> That's could be a problem. Is it possible to wrap imageObserver, which
>> was passed to the drawImage, and replace one image to another in the
>> WrapperImageObserver.imageUpdate()?
>
> It's possible - the things to watch out for:
>
> - they could hand the same IO in for multiple drawImage calls to
> multiple images
>
> - they could hand the same IO in repeatedly for the same image while
> it is loading if the loading takes a while or the image is animated;
> you don't want to necessarily create an infinite number of wrappers
> for the same observer and register them all with the image loading
> mechanism
>
> - the image that you report to them should probably be the original
> image, not the resolution-specific underlying images
>
> - we need to deal with making sure that the information flowing to the
> IO does not report complete until all resolution variants that we plan
> to load are done
>
> - given Mike's answer to my previous questions, it looks like @2x is
> not a retina-specific issue, all images do that even non non-retina
> apparently so maybe we do want to load all variants up front?
>
> - we don't want to pass ERROR conditions to the IO unless all
> resolution variants are errored, we should silently swallow any ERROR
> conditions for just some of the resolution variants and make do with
> what we have
Well, it is necessary to decide that it is simpler to bypass all these
problems or to move them to the user. As ScalableToolkitImage
implementation is trivial.
>
> ...jim
--
Best regards, Sergey.
More information about the macosx-port-dev
mailing list