modules/graphics/src/main/java/javafx/scene/Scene.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 84,94 **** import java.security.AccessControlContext; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.*; ! import static com.sun.javafx.logging.PulseLogger.PULSE_LOGGER; import static com.sun.javafx.logging.PulseLogger.PULSE_LOGGING_ENABLED; /** * The JavaFX {@code Scene} class is the container for all content in a scene graph. * The background of the scene is filled as specified by the {@code fill} property. --- 84,94 ---- import java.security.AccessControlContext; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.*; ! import com.sun.javafx.logging.PulseLogger; import static com.sun.javafx.logging.PulseLogger.PULSE_LOGGING_ENABLED; /** * The JavaFX {@code Scene} class is the container for all content in a scene graph. * The background of the scene is filled as specified by the {@code fill} property.
*** 2315,2372 **** PerformanceTracker.logEvent("Scene - first repaint"); } focusCleanup(); ! if (PULSE_LOGGING_ENABLED) { ! long start = System.currentTimeMillis(); Scene.this.doCSSPass(); - PULSE_LOGGER.fxMessage(start, System.currentTimeMillis(), "CSS Pass"); ! start = System.currentTimeMillis(); Scene.this.doLayoutPass(); - PULSE_LOGGER.fxMessage(start, System.currentTimeMillis(), "Layout Pass"); - } else { - Scene.this.doCSSPass(); - Scene.this.doLayoutPass(); - } boolean dirty = dirtyNodes == null || dirtyNodesSize != 0 || !isDirtyEmpty(); if (dirty) { getRoot().updateBounds(); if (impl_peer != null) { try { ! long start = PULSE_LOGGING_ENABLED ? System.currentTimeMillis() : 0; impl_peer.waitForRenderingToComplete(); impl_peer.waitForSynchronization(); - if (PULSE_LOGGING_ENABLED) { - PULSE_LOGGER.fxMessage(start, System.currentTimeMillis(), "Waiting for previous rendering"); - } - start = PULSE_LOGGING_ENABLED ? System.currentTimeMillis() : 0; // synchronize scene properties syncLights(); synchronizeSceneProperties(); // Run the synchronizer synchronizeSceneNodes(); Scene.this.mouseHandler.pulse(); // Tell the scene peer that it needs to repaint impl_peer.markDirty(); - if (PULSE_LOGGING_ENABLED) { - PULSE_LOGGER.fxMessage(start, System.currentTimeMillis(), "Copy state to render graph"); - } } finally { impl_peer.releaseSynchronization(true); } } else { ! long start = PULSE_LOGGING_ENABLED ? System.currentTimeMillis() : 0; synchronizeSceneProperties(); synchronizeSceneNodes(); Scene.this.mouseHandler.pulse(); - if (PULSE_LOGGING_ENABLED) { - PULSE_LOGGER.fxMessage(start, System.currentTimeMillis(), "Synchronize with null peer"); - } - } if (Scene.this.getRoot().cssFlag != CssFlags.CLEAN) { Scene.this.getRoot().impl_markDirty(com.sun.javafx.scene.DirtyBits.NODE_CSS); } --- 2315,2356 ---- PerformanceTracker.logEvent("Scene - first repaint"); } focusCleanup(); ! if (PULSE_LOGGING_ENABLED) PulseLogger.newPhase("CSS Pass"); Scene.this.doCSSPass(); ! if (PULSE_LOGGING_ENABLED) PulseLogger.newPhase("Layout Pass"); Scene.this.doLayoutPass(); boolean dirty = dirtyNodes == null || dirtyNodesSize != 0 || !isDirtyEmpty(); if (dirty) { + if (PULSE_LOGGING_ENABLED) PulseLogger.newPhase("Update bounds"); getRoot().updateBounds(); if (impl_peer != null) { try { ! if (PULSE_LOGGING_ENABLED) PulseLogger.newPhase("Waiting for previous rendering"); impl_peer.waitForRenderingToComplete(); impl_peer.waitForSynchronization(); // synchronize scene properties + if (PULSE_LOGGING_ENABLED) PulseLogger.newPhase("Copy state to render graph"); syncLights(); synchronizeSceneProperties(); // Run the synchronizer synchronizeSceneNodes(); Scene.this.mouseHandler.pulse(); // Tell the scene peer that it needs to repaint impl_peer.markDirty(); } finally { impl_peer.releaseSynchronization(true); } } else { ! if (PULSE_LOGGING_ENABLED) PulseLogger.newPhase("Synchronize with null peer"); synchronizeSceneProperties(); synchronizeSceneNodes(); Scene.this.mouseHandler.pulse(); } if (Scene.this.getRoot().cssFlag != CssFlags.CLEAN) { Scene.this.getRoot().impl_markDirty(com.sun.javafx.scene.DirtyBits.NODE_CSS); }