Documentation ¶
Overview ¶
Package client provides functions for launching and communicating with the gapii tracer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Capture ¶
func Capture(ctx context.Context, port int, s task.Signal, w io.Writer, options Options) (int64, error)
Capture opens up the specified port and then waits for a capture to be delivered using the specified capture options. It copies the capture into the supplied writer.
func StartOrAttach ¶
func StartOrAttach(ctx context.Context, p *android.InstalledPackage, a *android.ActivityAction) (port adb.TCPPort, cleanup task.Task, err error)
StartOrAttach launches an activity on an android device with the GAPII interceptor enabled using the gapid.apk built for the ABI matching the specified action and device. If there is no activity provided, it will try to attach to any already running one. GAPII will attempt to connect back on the returned host port to write the trace.
Types ¶
type Flags ¶
type Flags uint32
Flags is a bit-field of flags to use when creating a capture.
const ( // DisablePrecompiledShaders fakes no support for PCS, forcing the app to // share shader source. DisablePrecompiledShaders Flags = 0x00000001 // RecordErrorState queries the driver error state after each all and stores // errors as extras. RecordErrorState Flags = 0x10000000 // DeferStart does not start tracing right away but waits for a signal // from gapit DeferStart Flags = 0x00000010 )
type Options ¶
type Options struct { // If non-zero, then a framebuffer-observation will be made after every n end-of-frames. ObserveFrameFrequency uint32 // If non-zero, then a framebuffer-observation will be made after every n draw calls. ObserveDrawFrequency uint32 // If non-zero, then the capture will only start at frame n. StartFrame uint32 // If non-zero, then only n frames will be captured. FramesToCapture uint32 // A bitmask of the APIs to capture in a trace. APIs uint32 // Combination of FlagXX bits. Flags Flags // APK is an apk to install before tracing APK file.Path }
Options to use when creating a capture.