import "android.googlesource.com/platform/tools/gpu/atom/transform"
Package transform provides implementations of the atom Transformer interface.
type EarlyTerminator struct {
}
EarlyTerminator is an implementation of Transformer that will consume all atoms (except for the EOS atom) once all the atoms passed to Add have passed through the transformer.
func (t *EarlyTerminator) Add(id atom.ID)
Add adds the atom with identifier id to the set of atoms that must be seen before the EarlyTerminator will consume all atoms (excluding the EOS atom).
func (t *EarlyTerminator) Flush(out atom.Writer)
func (t *EarlyTerminator) Transform(id atom.ID, a atom.Atom, out atom.Writer)
type Injector struct {
}
Injector is an implementation of Transformer that can inject atoms into the atom stream.
func (t *Injector) Flush(out atom.Writer)
func (t *Injector) Inject(after atom.ID, id atom.ID, a atom.Atom)
Inject emits the atom a with identifier id after the atom with identifier after.
func (t *Injector) Transform(id atom.ID, a atom.Atom, out atom.Writer)
type SkipDrawCalls struct {
}
SkipDrawCalls is an implementation of Transformer that skips all draw calls that have not been explicitly requested.
func (t *SkipDrawCalls) Draw(id atom.ID)
Draw adds an exception to allow all draw calls up to and including the atom with identifier id for the frame holding the atom.
func (t *SkipDrawCalls) Flush(out atom.Writer)
func (t *SkipDrawCalls) Transform(id atom.ID, a atom.Atom, out atom.Writer)
type Trace struct {
Logger log.Logger
}
Trace is an implementation of Transformer that records each atom id and atom value that passes through Trace to Logger. Atoms passing through Trace are written to the output Writer unaltered.
func (t Trace) Flush(out atom.Writer)
func (t Trace) Transform(id atom.ID, a atom.Atom, out atom.Writer)