changeset 3768:b29ce522d568

RT-30802: Quantum Cleanup: Make pipeline initialization happen in run()
author snorthov
date Thu, 30 May 2013 07:39:26 -0400
parents 0da32bf95d30
children 804a55322e91
files javafx-ui-quantum/src/com/sun/javafx/tk/quantum/EmbeddedPainter.java
diffstat 1 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-quantum/src/com/sun/javafx/tk/quantum/EmbeddedPainter.java	Thu May 30 11:56:03 2013 +0200
+++ b/javafx-ui-quantum/src/com/sun/javafx/tk/quantum/EmbeddedPainter.java	Thu May 30 07:39:26 2013 -0400
@@ -60,14 +60,6 @@
         if (escene.host == null) {
             return false;
         }
-
-        Screen mainScreen = Screen.getMainScreen();
-        GraphicsPipeline pipeline = GraphicsPipeline.getPipeline();
-        factory = pipeline.getResourceFactory(mainScreen);
-        
-        if (!factory.isDeviceReady()) {
-            return false;
-        }
         
         if ((escene.width <= 0) || (escene.height <= 0)) {
             return false;
@@ -84,6 +76,15 @@
             return;
         }
 
+        if (factory == null) {
+            Screen mainScreen = Screen.getMainScreen();
+            GraphicsPipeline pipeline = GraphicsPipeline.getPipeline();
+            factory = pipeline.getResourceFactory(mainScreen);
+            if (!factory.isDeviceReady()) {
+                return;
+            }
+        }
+
         escene.sizeLock.lock();
         
         try {