Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ public void appStep(AppStep appStep) {
}
}

@Override
public void appSubStep(String... additionalInfo) {

}

public void vpStep(VpStep vpStep, ViewPort vp, RenderQueue.Bucket bucket) {
if (androidApiLevel >= 18) {
switch (vpStep) {
Expand Down
4 changes: 4 additions & 0 deletions jme3-core/src/main/java/com/jme3/app/BasicProfiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ public void appStep( AppStep step ) {
}
}

@Override
public void appSubStep(String... additionalInfo) {
}

@Override
public void vpStep( VpStep step, ViewPort vp, Bucket bucket ) {
}
Expand Down
11 changes: 11 additions & 0 deletions jme3-core/src/main/java/com/jme3/app/DetailedProfiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ public void appStep(AppStep step) {
closeFrame();
}
}


@Override
public void appSubStep(String... additionalInfo) {
if (data != null) {
String pathStep = getPath("", additionalInfo);
path.setLength(0);
path.append(curAppPath).append(pathStep);
addStep(path.toString(), System.nanoTime());
}
}

private void closeFrame() {
//close frame
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
package com.jme3.app.state;

import com.jme3.app.Application;
import com.jme3.profile.AppProfiler;
import com.jme3.renderer.RenderManager;
import com.jme3.util.SafeArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -284,6 +285,9 @@ public void update(float tpf){
AppState[] array = getStates();
for (AppState state : array){
if (state.isEnabled()) {
if (app.getAppProfiler() != null) {
app.getAppProfiler().appSubStep(state.getClass().getSimpleName());
}
state.update(tpf);
}
}
Expand Down
5 changes: 5 additions & 0 deletions jme3-core/src/main/java/com/jme3/profile/AppProfiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ public interface AppProfiler {
*/
public void appStep(AppStep step);

/**
* Called as a substep of the previous AppStep
*/
public void appSubStep(String... additionalInfo);

/**
* Called at the beginning of the specified VpStep during
* the rendering of the specified ViewPort. For bucket-specific
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ public void appStep(AppStep step) {

}

@Override
public void appSubStep(String... additionalInfo) {

}

@Override
public void vpStep(VpStep step, ViewPort vp, RenderQueue.Bucket bucket) {

Expand Down