Skip to content

Commit

Permalink
gvr: Minor tweak to GVR extension.
Browse files Browse the repository at this point in the history
Make sure the capture has a GVR context before changing anything.
  • Loading branch information
ben-clayton committed Sep 15, 2017
1 parent c9a25d0 commit aaa8aef
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions gapis/api/gvr/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ const (
func adjustContexts(ctx context.Context, ctxs []*api.ContextInfo) {
// Look for the renderer context.
tyGvrFrameSubmit := reflect.TypeOf(&Gvr_frame_submit{})
if c := findContextByCommand(ctxs, tyGvrFrameSubmit); c != nil {
c.UserData[rendererCtx] = true
c.Name = "Main context (" + c.Name + ")"
}

// Look for the reprojection context.
tyGlFlush := reflect.TypeOf(&gles.GlFlush{})
if c := findContextByCommand(ctxs, tyGlFlush); c != nil {
c.UserData[reprojectionCtx] = true
c.Name = "Reprojection context"

renderer := findContextByCommand(ctxs, tyGvrFrameSubmit)
reprojection := findContextByCommand(ctxs, tyGlFlush)

if renderer != nil && reprojection != nil {
renderer.UserData[rendererCtx] = true
renderer.Name = "Main context (" + renderer.Name + ")"
reprojection.UserData[reprojectionCtx] = true
reprojection.Name = "Reprojection context (" + reprojection.Name + ")"
}
}

Expand Down

0 comments on commit aaa8aef

Please sign in to comment.