Преглед изворни кода

Added profile tracking to AppStateManager for render and post render. (#1485)

Trevor Flynn пре 4 година
родитељ
комит
73cf6c32fb
1 измењених фајлова са 6 додато и 0 уклоњено
  1. 6 0
      jme3-core/src/main/java/com/jme3/app/state/AppStateManager.java

+ 6 - 0
jme3-core/src/main/java/com/jme3/app/state/AppStateManager.java

@@ -365,6 +365,9 @@ public class AppStateManager {
         AppState[] array = getStates();
         for (AppState state : array){
             if (state.isEnabled()) {
+                if (app.getAppProfiler() != null) {
+                    app.getAppProfiler().appSubStep(state.getClass().getSimpleName());
+                }
                 state.render(rm);
             }
         }
@@ -377,6 +380,9 @@ public class AppStateManager {
         AppState[] array = getStates();
         for (AppState state : array){
             if (state.isEnabled()) {
+                if (app.getAppProfiler() != null) {
+                    app.getAppProfiler().appSubStep(state.getClass().getSimpleName());
+                }
                 state.postRender();
             }
         }