changeset 5273:137e59786fc1

RT-30750 Jitter on Resize Reviewed by: KevinR, SteveN, Artem, DaveH
author "Joseph Andresen<joseph.andresen@oracle.com>"
date Fri, 04 Oct 2013 12:21:00 -0700
parents c71c80693664
children 66325e8963ef
files modules/graphics/src/main/java/com/sun/javafx/tk/quantum/EmbeddedState.java modules/graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumToolkit.java modules/graphics/src/main/java/com/sun/javafx/tk/quantum/SceneState.java
diffstat 3 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/EmbeddedState.java	Fri Oct 04 11:05:03 2013 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/EmbeddedState.java	Fri Oct 04 12:21:00 2013 -0700
@@ -77,10 +77,7 @@
      */
     public void update() {
         super.update();
-        EmbeddedScene escene = (EmbeddedScene) scene;
         if (scene != null) {
-            viewWidth = escene.width;
-            viewHeight = escene.height;
             // These variables and others from the super class need be kept up to date to
             // minimize rendering.  For now, claim that the embedded scene is always visible
             // and not minimized so that rendering can occur
--- a/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumToolkit.java	Fri Oct 04 11:05:03 2013 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumToolkit.java	Fri Oct 04 12:21:00 2013 -0700
@@ -178,7 +178,7 @@
             AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
                 @Override public Boolean run() {
                     boolean isSWT = "swt".equals(System.getProperty("glass.platform"));
-                    String result = PlatformUtil.isMac() && !isSWT ? "true" : "false";
+                    String result = (PlatformUtil.isMac() || PlatformUtil.isWindows()) && !isSWT ? "true" : "false";
                     return "true".equals(System.getProperty("javafx.live.resize", result));
                 }
             });
--- a/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/SceneState.java	Fri Oct 04 11:05:03 2013 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/SceneState.java	Fri Oct 04 12:21:00 2013 -0700
@@ -29,6 +29,7 @@
 
 import com.sun.glass.ui.Application;
 import com.sun.glass.ui.Pixels;
+import com.sun.javafx.sg.prism.NGCamera;
 import com.sun.prism.PresentableState;
 
 /**
@@ -93,6 +94,14 @@
         // for the updated state.
         view = scene.getPlatformView();
         super.update();
+        NGCamera camera = scene.getCamera();
+        //Use the camera width and height so that we are consistent
+        //with what was used to calculate the Projection Matrix at
+        //sync time.
+        if (camera != null) {
+            viewWidth = (int)camera.getViewWidth();
+            viewHeight = (int)camera.getViewHeight();
+        }
     }
     
     /**