<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 11:25:47 PST 2013
On 13.11.2013 22:49, Jim Graham wrote:
>
>
> On 11/13/13 4:33 AM, Sergey Bylokhov wrote:
>> On 12.11.2013 23:43, Jim Graham wrote:
>>> - The logic in using the transform is also a bit murky. I think if
>>> you set the scale on a retina display to exactly 1/2 it would use the
>>> HiDPI version even though the scale was 1:1. Since I support not
>>> examining the transform there, I'm going to present this as another
>>> reason why we should just base it on devScale, but the logic could be
>>> fixed if we really plan to use the transform here.
>> It also allow to the user to use a transform and a hint and force the
>> images to draw the scaled version even to the BufferedImage fo ex. Which
>> can be useful in case of sequential drawing of BI-> BI->retina.
>
> I think you misunderstood me here. I'm not saying anything about the
> BI->BI->retina case. I'm saying that even on pure retina your logic
> chooses the wrong scale because of mistakes made in examining the
> transform state type.
No I understood. But a transform of the sg2d already include devScale.
This part of the fix was changed from version to version. We could use
devScale only, or a transform if it is scaled, or an any transform. If
nobody objects, we could use any type of transform.
My point about BI1-BI2-retina is that the user cannot control devScale,
and so cannot force BI1 to use scaled version. But if we take into
account current transform of the SG2D, then user can control that via
transform and hint.
>
> If devScale is 2, but the transform is a scale then the scales used to
> compute the resolution image will be based solely on the transform.
> If devScale is 2, but the transform is identity, then the scales used
> to compute the resolution image should be 1.0 because that is the
> actual scale being applied to the image, but the logic will use 2
> (i.e. the devScale) instead because of bad handling of the
> transformState.
>
> Also, in the case of TRANSFORM_GENERIC just the devScale is used even
> if they scale it down to .001.
>
> You probably need to only use the transform if you are going to use it
> at all and you need to use it for all transformState values (there may
> be optimizations based on the transformState, but the most complete
> transform type should not fall through to a default, neither should
> the translate-only states).
>
> ...jim
--
Best regards, Sergey.
More information about the macosx-port-dev
mailing list