client

package
v0.9.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2017 License: Apache-2.0 Imports: 23 Imported by: 30

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

This section is empty.

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.

type Process added in v0.6.0

type Process struct {
	// The local host port used to connect to GAPII.
	Port int

	// The options used for the capture.
	Options Options
	// contains filtered or unexported fields
}

Process represents a running process to capture.

func StartOrAttach

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.

func (*Process) Capture added in v0.6.0

func (p *Process) Capture(ctx context.Context, s task.Signal, w io.Writer) (size int64, err error)

Capture opens up the specified port and then waits for a capture to be delivered using the specified capture options o. It copies the capture into the supplied writer. If the process was started with the DeferStart flag, then tracing will wait until s is fired.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL