Duplicate :
|
|
Relates :
|
|
Relates :
|
FULL PRODUCT VERSION : java version "1.8.0_51" Java(TM) SE Runtime Environment (build 1.8.0_51-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode) ADDITIONAL OS VERSION INFORMATION : Windows 7 64 bit EXTRA RELEVANT SYSTEM CONFIGURATION : i7 4790k 16Gb RAM Nvidia GTX 750 driver 355.60 Dual Monitor A DESCRIPTION OF THE PROBLEM : Animation is jerky with simplest example (code provided). Every second/half second (irregular) it stops for a moment and jumps forward like something disrupting the timing or presentation render. The interesting thing is that when I resize the window (no matter to what size, larger or smaller) by dragging the corner, animation becomes SILKY smooth. The same if I go full screen and it stays smooth when I go back windowed. This led to the following workaround: if I do resize in code on app start like this javafx.application.Platform.runLater(()->{ primaryStage.setWidth(1278); javafx.application.Platform.runLater(()->{ primaryStage.setWidth(1280); javafx.application.Platform.runLater(()->{ primaryStage.setWidth(1278); javafx.application.Platform.runLater(()->{ primaryStage.setWidth(1280); }); }); }); }); the animation works smooth! Another detail that may help is that on second monitor (which is primary when PC starts but is secondary/extended desktop in Windows) the windowed mode animation is always jerky, no matter what. Resize etc. doesn't help. But in full screen mode on second monitor animation is smooth. Going back to windowed returns to jerky animation again and going full screen again runs smooth again. Let me know if further details like pulse log are needed. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Nvidia GTX 750, Intel Graphics disabled in BIOS (enabling doesn't matter), attached example EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - Smooth animation on both monitors on app start. ACTUAL - On primary monitor: smooth animation in windowed mode after resizing window undetermined number of times, smooth full screen always. On secondary monitor: always jerky animation in windowed mode, smooth in full screen mode. REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- public class JavaFxApp extends Application { @Override public void start(Stage primaryStage) throws Exception { Pane root = new Pane(); Rectangle rectangle = new Rectangle(200, 100); rectangle.setFill(Color.GREEN); root.getChildren().add(rectangle); TranslateTransition transition = new TranslateTransition(Duration.millis(5000), rectangle); transition.setFromX(1280); transition.setToX(-226); transition.setCycleCount(Animation.INDEFINITE); transition.setInterpolator(Interpolator.LINEAR); transition.play(); Scene scene = new Scene(root, 1280, 720); primaryStage.setTitle("Test JavaFX"); primaryStage.setScene(scene); primaryStage.setX(2000); primaryStage.show(); } public static void main(String[] args) { launch(args); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : On primary monitor: resize window few times manually or programatically. On secondary monitor: full screen only.