tree: 2c4fb9e26eb741d17b8d727ba011b8df49286ed5 [path history] [tgz]
  1. common_test.go
  2. doc.go
  3. early_terminator.go
  4. early_terminator_test.go
  5. injector.go
  6. injector_test.go
  7. README.md
  8. skip_draw_calls.go
  9. skip_draw_calls_test.go
  10. trace_log.go
atom/transform/README.md

transform


import "android.googlesource.com/platform/tools/gpu/atom/transform"

Package transform provides implementations of the atom Transformer interface.

Usage

type EarlyTerminator

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 (*EarlyTerminator) Add

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 (*EarlyTerminator) Flush

func (t *EarlyTerminator) Flush(out atom.Writer)

func (*EarlyTerminator) Transform

func (t *EarlyTerminator) Transform(id atom.ID, a atom.Atom, out atom.Writer)

type Injector

type Injector struct {
}

Injector is an implementation of Transformer that can inject atoms into the atom stream.

func (*Injector) Flush

func (t *Injector) Flush(out atom.Writer)

func (*Injector) Inject

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 (*Injector) Transform

func (t *Injector) Transform(id atom.ID, a atom.Atom, out atom.Writer)

type SkipDrawCalls

type SkipDrawCalls struct {
}

SkipDrawCalls is an implementation of Transformer that skips all draw calls that have not been explicitly requested.

func (*SkipDrawCalls) Draw

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 (*SkipDrawCalls) Flush

func (t *SkipDrawCalls) Flush(out atom.Writer)

func (*SkipDrawCalls) Transform

func (t *SkipDrawCalls) Transform(id atom.ID, a atom.Atom, out atom.Writer)

type Trace

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 (Trace) Flush

func (t Trace) Flush(out atom.Writer)

func (Trace) Transform

func (t Trace) Transform(id atom.ID, a atom.Atom, out atom.Writer)