--- old/modules/graphics/src/main/java/com/sun/glass/ui/Application.java 2014-01-16 20:22:39.000000000 +0200 +++ new/modules/graphics/src/main/java/com/sun/glass/ui/Application.java 2014-01-16 20:22:38.000000000 +0200 @@ -364,6 +364,18 @@ return true; // overridden in platform application class } + /** + * Gets a Runnable object to be called on the application thread to + * notify that rendering has completed. Systems that require notification + * of rendering completion should override this method. + * + * @return a Runnable to be called on the application thread when rendering + * has completed, or null if no notification is needed. + */ + public Runnable getRenderEndNotifier() { + return null; + } + public void terminate() { checkEventThread(); try { --- old/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/PaintCollector.java 2014-01-16 20:22:40.000000000 +0200 +++ new/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/PaintCollector.java 2014-01-16 20:22:39.000000000 +0200 @@ -299,6 +299,11 @@ toolkit.vsyncHint(); } + Runnable renderEndNotifier = Application.GetApplication().getRenderEndNotifier(); + if (renderEndNotifier != null) { + Application.invokeLater(renderEndNotifier); + } + // If pulse logging is enabled, then we must call renderEnd now // that we know that all of the scene's being rendered are finished if (PULSE_LOGGING_ENABLED) {