-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.go
63 lines (51 loc) · 2.07 KB
/
test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Copyright (C) 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package test
import (
"context"
"github.com/google/gapid/core/math/interval"
"github.com/google/gapid/gapis/api"
"github.com/google/gapid/gapis/service/path"
)
type customState struct{}
func (customState) init(*State) {}
// RebuildState is a no-op to conform to the api.API interface.
func (API) RebuildState(ctx context.Context, s *api.GlobalState) ([]api.Cmd, interval.U64RangeList) {
return nil, nil
}
func (API) GetFramebufferAttachmentInfo(
ctx context.Context,
after []uint64,
state *api.GlobalState,
thread uint64,
attachment api.FramebufferAttachment) (api.FramebufferAttachmentInfo, error) {
return api.FramebufferAttachmentInfo{}, nil
}
func (API) Context(context.Context, *api.GlobalState, uint64) api.Context { return nil }
// Root returns the path to the root of the state to display. It can vary based
// on filtering mode. Returning nil, nil indicates there is no state to show at
// this point in the capture.
func (s *State) Root(ctx context.Context, p *path.State, r *path.ResolveConfig) (path.Node, error) {
return p, nil
}
// SetupInitialState sanitizes deserialized state to make it valid.
// It can fill in any derived data which we choose not to serialize,
// or it can apply backward-compatibility fixes for older traces.
func (*State) SetupInitialState(ctx context.Context) {}
func (c *State) preMutate(ctx context.Context, s *api.GlobalState, cmd api.Cmd) error {
return nil
}
func (i Remapped) remap(cmd api.Cmd, s *api.GlobalState) (interface{}, bool) {
return i, true
}