Skip to content

Commit

Permalink
Fixes the "hanging shader view" bug.
Browse files Browse the repository at this point in the history
When selecting a command at a point in the trace where all shaders have
been created, then opening/capturing another trace, will cause the shader
view to stop updating itself, unless a command is selected in the (new)
trace before all shaders were created.

Fixes #1195
Fixes #1309
  • Loading branch information
pmuetschard committed Nov 3, 2017
1 parent 6c4f718 commit a8d6031
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gapic/src/main/com/google/gapid/views/ShaderView.java
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ public void setSource(Source[] sources) {

@Override
public void onResourcesLoaded() {
lastUpdateContainedAllShaders = false;
updateShaders();
}

Expand Down Expand Up @@ -426,12 +427,16 @@ public String toString() {
}
newShaders.add(new Data(info));
} else {
// This shader has not been created yet at this point in the trace, so we don't
// show it. Remember that we've skipped a shader and the UI list is incomplete.
skippedAnyShaders = true;
}
}
}
}

// If we previously had created the dropdown with all the shaders and didn't skip any
// this time, the dropdown does not need to change.
if (!lastUpdateContainedAllShaders || skippedAnyShaders) {
shaders = newShaders;
lastUpdateContainedAllShaders = !skippedAnyShaders;
Expand Down

0 comments on commit a8d6031

Please sign in to comment.