RFR: 8274932: Render scales in EmbeddedWindow are not properly updated [v9]

Andy Goryachev angorya at openjdk.org
Tue Aug 15 14:44:21 UTC 2023


On Fri, 4 Aug 2023 06:21:55 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> When the JavaFX scene is set before it is really shown, then the scale factors are not properly propagated to the EmbeddedWindow, resulting in showing wrong scales.
>> Fix is made to update scales to EmbeddedWindow
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Duplicate code removal

modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java line 630:

> 628:         pHeight = Math.max(0, getHeight());
> 629:         Graphics g = getGraphics();
> 630:         double newScaleFactorX = getCurrentTransform().getScaleX();

minor (here and later): unless optimized away by the compiler, this code invokes getCurrentTransform() twice.  Would it make sense to introduce a local variable?

AffineTransform t = getCurrentTransform();
double sx = t.getScaleX();
double sy = t.getScaleY();

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1171#discussion_r1294688045


More information about the openjfx-dev mailing list