浏览代码

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();
             }
         }