changeset 1661:de4c5b536f72

Added layout counters.
author rbair
date Thu, 16 Aug 2012 16:36:07 -0700
parents 9041e7dbf755
children f0c0c9d89e6b
files javafx-ui-common/src/javafx/scene/Parent.java javafx-ui-common/src/javafx/scene/Scene.java
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/javafx/scene/Parent.java	Thu Aug 16 09:54:03 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/Parent.java	Thu Aug 16 16:36:07 2012 -0700
@@ -59,6 +59,9 @@
 import com.sun.javafx.sg.PGNode;
 import com.sun.javafx.tk.Toolkit;
 
+import static com.sun.javafx.logging.PulseLogger.PULSE_LOGGING_ENABLED;
+import static com.sun.javafx.logging.PulseLogger.PULSE_LOGGER;
+
 /**
  * The base class for all nodes that have children in the scene graph.
  * <p>
@@ -994,6 +997,7 @@
      */
     public final void layout() {
         if (isNeedsLayout()) {
+            if (PULSE_LOGGING_ENABLED) PULSE_LOGGER.fxIncrementCounter("Parent#layout() on dirty Node");
             performingLayout = true;
 
             PlatformLogger logger = Logging.getLayoutLogger();
@@ -1015,6 +1019,8 @@
                 }
             }
             performingLayout = false;
+        } else {
+            if (PULSE_LOGGING_ENABLED) PULSE_LOGGER.fxIncrementCounter("Parent#layout() on clean Node");
         }
     }
 
--- a/javafx-ui-common/src/javafx/scene/Scene.java	Thu Aug 16 09:54:03 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/Scene.java	Thu Aug 16 16:36:07 2012 -0700
@@ -44,7 +44,6 @@
 import javafx.beans.Observable;
 import javafx.beans.property.ReadOnlyBooleanProperty;
 import javafx.beans.property.SimpleObjectProperty;
-import javafx.collections.FXCollections;
 import javafx.collections.ListChangeListener.Change;
 import javafx.collections.ObservableList;
 import javafx.collections.ObservableMap;