diff options
-rw-r--r-- | _experimental/client/README.md | 1414 | ||||
-rw-r--r-- | _experimental/client/charts/README.md | 283 | ||||
-rw-r--r-- | _experimental/client/charts/samples/barchart/README.md | 2 | ||||
-rw-r--r-- | _experimental/client/gapid/README.md | 2 | ||||
-rw-r--r-- | _experimental/client/schema/README.md | 252 | ||||
-rw-r--r-- | adb/README.md | 306 | ||||
-rw-r--r-- | api/README.md | 67 | ||||
-rw-r--r-- | binary/schema/README.md | 1093 | ||||
-rw-r--r-- | device/README.md | 25 | ||||
-rw-r--r-- | gapii/README.md | 25 | ||||
-rw-r--r-- | tools/gapit/README.md | 2 |
11 files changed, 3471 insertions, 0 deletions
diff --git a/_experimental/client/README.md b/_experimental/client/README.md new file mode 100644 index 000000000..51286a776 --- /dev/null +++ b/_experimental/client/README.md @@ -0,0 +1,1414 @@ +# client +-- + import "android.googlesource.com/platform/tools/gpu/_experimental/client" + + +## Usage + +```go +const InvalidAtomID = ^atom.ID(0) +``` + +```go +var ( + LINE_NUMBER_COLOR gxui.Color = gxui.ColorFromHex(0xFF1CAFFF) + CODE_COLOR gxui.Color = gxui.ColorFromHex(0xFFFFE8BB) + COMMAND_COLOR gxui.Color = gxui.ColorFromHex(0xFFFB9868) + MEMORY_OBSERVATION_COLOR gxui.Color = gxui.ColorFromHex(0xFFA1CF8A) + INACTIVE_COLOR gxui.Color = gxui.ColorFromHex(0xFF505050) + CONSTANT_COLOR gxui.Color = gxui.ColorFromHex(0xFFDDB7FF) + MEMORY_COLOR gxui.Color = gxui.ColorFromHex(0xFFFFE8BB) + STALE_MEMORY_COLOR gxui.Color = gxui.ColorFromHex(0xFF8A7753) +) +``` + +#### func AddTextToolTip + +```go +func AddTextToolTip(appCtx *ApplicationContext, target gxui.Control, text string) +``` + +#### func CreateColorBufferPanel + +```go +func CreateColorBufferPanel(appCtx *ApplicationContext) gxui.Control +``` + +#### func CreateCommandsPanel + +```go +func CreateCommandsPanel(appCtx *ApplicationContext) gxui.Control +``` + +#### func CreateDepthBufferPanel + +```go +func CreateDepthBufferPanel(appCtx *ApplicationContext) gxui.Control +``` + +#### func CreateDocsPanel + +```go +func CreateDocsPanel(appCtx *ApplicationContext) gxui.Control +``` + +#### func CreateFramesPanel + +```go +func CreateFramesPanel(appCtx *ApplicationContext) gxui.Control +``` + +#### func CreateGotoCommandDialog + +```go +func CreateGotoCommandDialog(appCtx *ApplicationContext) gxui.Window +``` + +#### func CreateGxuiDebug + +```go +func CreateGxuiDebug(appCtx *ApplicationContext, window gxui.Window, driver gxui.Driver) gxui.Control +``` + +#### func CreateImageViewerPanel + +```go +func CreateImageViewerPanel(appCtx *ApplicationContext) gxui.Control +``` + +#### func CreateLabel + +```go +func CreateLabel(t gxui.Theme, s string, c gxui.Color, active bool) gxui.Label +``` + +#### func CreateLaunchAndroidDialog + +```go +func CreateLaunchAndroidDialog(theme gxui.Theme, statusLogger log.Logger, capture func()) +``` + +#### func CreateLogPanel + +```go +func CreateLogPanel(appCtx *ApplicationContext) gxui.Control +``` + +#### func CreateMemoryPanel + +```go +func CreateMemoryPanel(appCtx *ApplicationContext) gxui.Control +``` + +#### func CreateMemoryPanelReinterpretButtons + +```go +func CreateMemoryPanelReinterpretButtons( + appCtx *ApplicationContext, + memory_list gxui.List, + rawAdapter *MemoryAdapter, + imgAdapter *MemoryImageAdapter) gxui.Control +``` + +#### func CreateProfilerPanel + +```go +func CreateProfilerPanel(appCtx *ApplicationContext) gxui.Control +``` + +#### func CreateStatePanel + +```go +func CreateStatePanel(appCtx *ApplicationContext) gxui.Control +``` + +#### func CreateTakeCaptureDialog + +```go +func CreateTakeCaptureDialog(appCtx *ApplicationContext) +``` + +#### func CreateWireframeButton + +```go +func CreateWireframeButton(appCtx *ApplicationContext) gxui.Button +``` + +#### func DoReplay + +```go +func DoReplay(appCtx *ApplicationContext) +``` + +#### func Run + +```go +func Run(config Config) +``` + +#### type ASCII + +```go +type ASCII uint8 +``` + + +#### func (ASCII) Name + +```go +func (v ASCII) Name() string +``` + +#### func (ASCII) Read + +```go +func (v ASCII) Read(buffer []byte) DataType +``` + +#### func (ASCII) SizeBytes + +```go +func (v ASCII) SizeBytes() int +``` + +#### func (ASCII) String + +```go +func (v ASCII) String() string +``` + +#### func (ASCII) Unknown + +```go +func (v ASCII) Unknown() string +``` + +#### type ApplicationContext + +```go +type ApplicationContext struct { + Config +} +``` + + +#### func CreateApplicationContext + +```go +func CreateApplicationContext(theme gxui.Theme, config Config) (*ApplicationContext, error) +``` + +#### func (*ApplicationContext) Atoms + +```go +func (c *ApplicationContext) Atoms() []schema.Atom +``` + +#### func (*ApplicationContext) Capture + +```go +func (c *ApplicationContext) Capture() service.Capture +``` + +#### func (*ApplicationContext) CaptureID + +```go +func (c *ApplicationContext) CaptureID() service.CaptureId +``` + +#### func (*ApplicationContext) ColorBuffer + +```go +func (c *ApplicationContext) ColorBuffer() gxui.Texture +``` + +#### func (*ApplicationContext) DepthBuffer + +```go +func (c *ApplicationContext) DepthBuffer() gxui.Texture +``` + +#### func (*ApplicationContext) DropDownOverlay + +```go +func (c *ApplicationContext) DropDownOverlay() gxui.BubbleOverlay +``` + +#### func (*ApplicationContext) Hierarchy + +```go +func (c *ApplicationContext) Hierarchy() atom.Group +``` + +#### func (*ApplicationContext) LoadCapture + +```go +func (c *ApplicationContext) LoadCapture(captureID service.CaptureId, resetSelected bool) +``` + +#### func (*ApplicationContext) LoadHierarchy + +```go +func (c *ApplicationContext) LoadHierarchy() +``` + +#### func (*ApplicationContext) LoadState + +```go +func (c *ApplicationContext) LoadState() +``` + +#### func (*ApplicationContext) Logger + +```go +func (c *ApplicationContext) Logger() *log.Splitter +``` + +#### func (*ApplicationContext) OnAddressSelected + +```go +func (c *ApplicationContext) OnAddressSelected(f func()) gxui.EventSubscription +``` + +#### func (*ApplicationContext) OnAtomSelected + +```go +func (c *ApplicationContext) OnAtomSelected(f func()) gxui.EventSubscription +``` + +#### func (*ApplicationContext) OnAtomsUpdated + +```go +func (c *ApplicationContext) OnAtomsUpdated(f func()) gxui.EventSubscription +``` + +#### func (*ApplicationContext) OnColorBufferUpdate + +```go +func (c *ApplicationContext) OnColorBufferUpdate(f func()) gxui.EventSubscription +``` + +#### func (*ApplicationContext) OnDepthBufferUpdate + +```go +func (c *ApplicationContext) OnDepthBufferUpdate(f func()) gxui.EventSubscription +``` + +#### func (*ApplicationContext) OnDeviceSelected + +```go +func (c *ApplicationContext) OnDeviceSelected(f func()) gxui.EventSubscription +``` + +#### func (*ApplicationContext) OnHierarchyUpdated + +```go +func (c *ApplicationContext) OnHierarchyUpdated(f func()) gxui.EventSubscription +``` + +#### func (*ApplicationContext) OnObjectSelected + +```go +func (c *ApplicationContext) OnObjectSelected(f func()) gxui.EventSubscription +``` + +#### func (*ApplicationContext) OnRequestReplay + +```go +func (c *ApplicationContext) OnRequestReplay(f func()) gxui.EventSubscription +``` + +#### func (*ApplicationContext) OnStateUpdated + +```go +func (c *ApplicationContext) OnStateUpdated(f func()) gxui.EventSubscription +``` + +#### func (*ApplicationContext) OnTimingInfoUpdated + +```go +func (c *ApplicationContext) OnTimingInfoUpdated(f func()) gxui.EventSubscription +``` + +#### func (*ApplicationContext) OnWireframeChanged + +```go +func (c *ApplicationContext) OnWireframeChanged(f func()) gxui.EventSubscription +``` + +#### func (*ApplicationContext) ReplaceAtom + +```go +func (c *ApplicationContext) ReplaceAtom(a schema.Atom, id atom.ID) +``` + +#### func (*ApplicationContext) RequestMemory + +```go +func (c *ApplicationContext) RequestMemory(after atom.ID, base memory.Pointer, size uint64, callback MemoryCallback) chan<- struct{} +``` + +#### func (*ApplicationContext) RequestReplay + +```go +func (c *ApplicationContext) RequestReplay() +``` + +#### func (*ApplicationContext) RequestThumbnail + +```go +func (c *ApplicationContext) RequestThumbnail(after atom.ID, maxWidth, maxHeight uint32, callback ImageCallback) chan<- struct{} +``` + +#### func (*ApplicationContext) Rpc + +```go +func (c *ApplicationContext) Rpc() service.RPC +``` + +#### func (*ApplicationContext) Run + +```go +func (c *ApplicationContext) Run(f func()) +``` + +#### func (*ApplicationContext) Schema + +```go +func (c *ApplicationContext) Schema() service.Schema +``` + +#### func (*ApplicationContext) SelectAddress + +```go +func (c *ApplicationContext) SelectAddress(address memory.Pointer) +``` + +#### func (*ApplicationContext) SelectAtom + +```go +func (c *ApplicationContext) SelectAtom(id atom.ID) +``` + +#### func (*ApplicationContext) SelectDevice + +```go +func (c *ApplicationContext) SelectDevice(device service.DeviceId) +``` + +#### func (*ApplicationContext) SelectObject + +```go +func (c *ApplicationContext) SelectObject(object interface{}) +``` + +#### func (*ApplicationContext) SelectedAddress + +```go +func (c *ApplicationContext) SelectedAddress() memory.Pointer +``` + +#### func (*ApplicationContext) SelectedAtomID + +```go +func (c *ApplicationContext) SelectedAtomID() atom.ID +``` + +#### func (*ApplicationContext) SelectedDevice + +```go +func (c *ApplicationContext) SelectedDevice() service.DeviceId +``` + +#### func (*ApplicationContext) SelectedObject + +```go +func (c *ApplicationContext) SelectedObject() interface{} +``` + +#### func (*ApplicationContext) SetWireframe + +```go +func (c *ApplicationContext) SetWireframe(value bool) +``` + +#### func (*ApplicationContext) State + +```go +func (c *ApplicationContext) State() schema.Struct +``` + +#### func (*ApplicationContext) Theme + +```go +func (c *ApplicationContext) Theme() gxui.Theme +``` + +#### func (*ApplicationContext) ToolTipController + +```go +func (c *ApplicationContext) ToolTipController() *gxui.ToolTipController +``` + +#### func (*ApplicationContext) ToolTipOverlay + +```go +func (c *ApplicationContext) ToolTipOverlay() gxui.BubbleOverlay +``` + +#### func (*ApplicationContext) UpdateSchema + +```go +func (c *ApplicationContext) UpdateSchema() +``` + +#### func (*ApplicationContext) Wireframe + +```go +func (c *ApplicationContext) Wireframe() bool +``` + +#### type CommandAdapter + +```go +type CommandAdapter struct { + gxui.AdapterBase +} +``` + + +#### func CreateCommandAdapter + +```go +func CreateCommandAdapter(appCtx *ApplicationContext) *CommandAdapter +``` + +#### func (CommandAdapter) AtomRange + +```go +func (a CommandAdapter) AtomRange(item gxui.AdapterItem) atom.Range +``` + +#### func (CommandAdapter) Count + +```go +func (n CommandAdapter) Count() int +``` + +#### func (CommandAdapter) Create + +```go +func (n CommandAdapter) Create(theme gxui.Theme, index int) gxui.Control +``` + +#### func (CommandAdapter) Item + +```go +func (a CommandAdapter) Item(id atom.ID) gxui.AdapterItem +``` + +#### func (CommandAdapter) ItemAt + +```go +func (n CommandAdapter) ItemAt(index int) gxui.AdapterItem +``` + +#### func (CommandAdapter) ItemIndex + +```go +func (n CommandAdapter) ItemIndex(item gxui.AdapterItem) int +``` + +#### func (CommandAdapter) NodeAt + +```go +func (n CommandAdapter) NodeAt(index int) gxui.TreeNode +``` + +#### func (*CommandAdapter) SetRoot + +```go +func (a *CommandAdapter) SetRoot(root atom.Group) +``` + +#### func (CommandAdapter) Size + +```go +func (a CommandAdapter) Size(theme gxui.Theme) math.Size +``` +gxui.TreeAdapter compliance + +#### type Config + +```go +type Config struct { + DataPath string + Gapis string + GXUIDebug bool + InitialCapture string + ReplayDevice string +} +``` + + +#### type DataType + +```go +type DataType interface { + Name() string + SizeBytes() int + String() string + Unknown() string + Read(buffer []byte) DataType +} +``` + + +#### type EnableDebugger + +```go +type EnableDebugger interface { + EnableDebug(bool) +} +``` + + +#### type F32 + +```go +type F32 float32 +``` + + +#### func (F32) Name + +```go +func (v F32) Name() string +``` + +#### func (F32) Read + +```go +func (v F32) Read(buffer []byte) DataType +``` + +#### func (F32) SizeBytes + +```go +func (v F32) SizeBytes() int +``` + +#### func (F32) String + +```go +func (v F32) String() string +``` + +#### func (F32) Unknown + +```go +func (v F32) Unknown() string +``` + +#### type F64 + +```go +type F64 float64 +``` + + +#### func (F64) Name + +```go +func (v F64) Name() string +``` + +#### func (F64) Read + +```go +func (v F64) Read(buffer []byte) DataType +``` + +#### func (F64) SizeBytes + +```go +func (v F64) SizeBytes() int +``` + +#### func (F64) String + +```go +func (v F64) String() string +``` + +#### func (F64) Unknown + +```go +func (v F64) Unknown() string +``` + +#### type FilmStripAdapter + +```go +type FilmStripAdapter struct { + gxui.AdapterBase +} +``` + + +#### func CreateFilmStripAdapter + +```go +func CreateFilmStripAdapter(appCtx *ApplicationContext) *FilmStripAdapter +``` + +#### func (*FilmStripAdapter) Count + +```go +func (a *FilmStripAdapter) Count() int +``` + +#### func (*FilmStripAdapter) Create + +```go +func (a *FilmStripAdapter) Create(t gxui.Theme, index int) gxui.Control +``` + +#### func (*FilmStripAdapter) ItemAt + +```go +func (a *FilmStripAdapter) ItemAt(index int) gxui.AdapterItem +``` + +#### func (*FilmStripAdapter) ItemIndex + +```go +func (a *FilmStripAdapter) ItemIndex(item gxui.AdapterItem) int +``` + +#### func (*FilmStripAdapter) SetAtoms + +```go +func (a *FilmStripAdapter) SetAtoms(atoms []schema.Atom) +``` + +#### func (*FilmStripAdapter) Size + +```go +func (a *FilmStripAdapter) Size(theme gxui.Theme) math.Size +``` + +#### type ImageCallback + +```go +type ImageCallback func(gxui.Texture) +``` + + +#### type InvokationHandler + +```go +type InvokationHandler struct { +} +``` + + +#### type LogAdapter + +```go +type LogAdapter struct { + gxui.AdapterBase +} +``` + + +#### func CreateLogAdapter + +```go +func CreateLogAdapter(maxLength int, callOnUI func(func()) bool) *LogAdapter +``` + +#### func (*LogAdapter) Clear + +```go +func (a *LogAdapter) Clear() +``` + +#### func (*LogAdapter) Count + +```go +func (a *LogAdapter) Count() int +``` + +#### func (*LogAdapter) Create + +```go +func (a *LogAdapter) Create(theme gxui.Theme, index int) gxui.Control +``` + +#### func (*LogAdapter) Entry + +```go +func (a *LogAdapter) Entry(index int) log.Entry +``` + +#### func (*LogAdapter) ItemAt + +```go +func (a *LogAdapter) ItemAt(index int) gxui.AdapterItem +``` + +#### func (*LogAdapter) ItemIndex + +```go +func (a *LogAdapter) ItemIndex(item gxui.AdapterItem) int +``` + +#### func (*LogAdapter) Logger + +```go +func (a *LogAdapter) Logger() log.Logger +``` + +#### func (*LogAdapter) Size + +```go +func (a *LogAdapter) Size(theme gxui.Theme) math.Size +``` + +#### type MemoryAdapter + +```go +type MemoryAdapter struct { + gxui.AdapterBase +} +``` + + +#### func CreateMemoryAdapter + +```go +func CreateMemoryAdapter(appCtx *ApplicationContext) *MemoryAdapter +``` + +#### func (*MemoryAdapter) AddressAtIndex + +```go +func (a *MemoryAdapter) AddressAtIndex(index int) memory.Pointer +``` + +#### func (*MemoryAdapter) Count + +```go +func (a *MemoryAdapter) Count() int +``` + +#### func (*MemoryAdapter) Create + +```go +func (a *MemoryAdapter) Create(t gxui.Theme, index int) gxui.Control +``` + +#### func (*MemoryAdapter) IndexOfAddress + +```go +func (a *MemoryAdapter) IndexOfAddress(addr memory.Pointer) int +``` + +#### func (*MemoryAdapter) ItemAt + +```go +func (a *MemoryAdapter) ItemAt(index int) gxui.AdapterItem +``` + +#### func (*MemoryAdapter) ItemIndex + +```go +func (a *MemoryAdapter) ItemIndex(item gxui.AdapterItem) int +``` + +#### func (*MemoryAdapter) SetData + +```go +func (a *MemoryAdapter) SetData(atomID atom.ID, baseAddress memory.Pointer) +``` + +#### func (*MemoryAdapter) SetDataType + +```go +func (a *MemoryAdapter) SetDataType(dataType DataType) +``` + +#### func (*MemoryAdapter) Size + +```go +func (a *MemoryAdapter) Size(theme gxui.Theme) math.Size +``` + +#### type MemoryCallback + +```go +type MemoryCallback func(service.MemoryInfo) +``` + + +#### type MemoryImageAdapter + +```go +type MemoryImageAdapter struct { + gxui.AdapterBase +} +``` + +////////////////////////////////////////////////////////////////////////////// +MemoryImageAdapter +////////////////////////////////////////////////////////////////////////////// + +#### func CreateMemoryImageAdapter + +```go +func CreateMemoryImageAdapter(appCtx *ApplicationContext) *MemoryImageAdapter +``` + +#### func (*MemoryImageAdapter) AddressAtIndex + +```go +func (a *MemoryImageAdapter) AddressAtIndex(index int) memory.Pointer +``` + +#### func (*MemoryImageAdapter) Count + +```go +func (a *MemoryImageAdapter) Count() int +``` + +#### func (*MemoryImageAdapter) Create + +```go +func (a *MemoryImageAdapter) Create(t gxui.Theme, index int) gxui.Control +``` + +#### func (*MemoryImageAdapter) IndexOfAddress + +```go +func (a *MemoryImageAdapter) IndexOfAddress(addr memory.Pointer) int +``` + +#### func (*MemoryImageAdapter) ItemAt + +```go +func (a *MemoryImageAdapter) ItemAt(index int) gxui.AdapterItem +``` + +#### func (*MemoryImageAdapter) ItemIndex + +```go +func (a *MemoryImageAdapter) ItemIndex(item gxui.AdapterItem) int +``` + +#### func (*MemoryImageAdapter) SetData + +```go +func (a *MemoryImageAdapter) SetData(atomID atom.ID, baseAddress memory.Pointer) +``` + +#### func (*MemoryImageAdapter) SetPixelType + +```go +func (a *MemoryImageAdapter) SetPixelType(pixelType PixelType) +``` + +#### func (*MemoryImageAdapter) Size + +```go +func (a *MemoryImageAdapter) Size(theme gxui.Theme) math.Size +``` + +#### type MemoryRequestCallback + +```go +type MemoryRequestCallback func(atomId atom.ID, address memory.Pointer, bytes []byte) +``` + + +#### type MemoryRequester + +```go +type MemoryRequester interface { + RequestMemory(atomId atom.ID, address memory.Pointer, size uint64, callback MemoryRequestCallback) +} +``` + + +#### type PixelType + +```go +type PixelType interface { + Name() string + SizeBytes() int + Read(buffer []byte) gxui.Color +} +``` + + +#### type RGB888 + +```go +type RGB888 int +``` + + +#### func (RGB888) Name + +```go +func (v RGB888) Name() string +``` + +#### func (RGB888) Read + +```go +func (v RGB888) Read(data []byte) gxui.Color +``` + +#### func (RGB888) SizeBytes + +```go +func (v RGB888) SizeBytes() int +``` + +#### type RGBA8888 + +```go +type RGBA8888 int +``` + + +#### func (RGBA8888) Name + +```go +func (v RGBA8888) Name() string +``` + +#### func (RGBA8888) Read + +```go +func (v RGBA8888) Read(data []byte) gxui.Color +``` + +#### func (RGBA8888) SizeBytes + +```go +func (v RGBA8888) SizeBytes() int +``` + +#### type S16 + +```go +type S16 int16 +``` + + +#### func (S16) Name + +```go +func (v S16) Name() string +``` + +#### func (S16) Read + +```go +func (v S16) Read(buffer []byte) DataType +``` + +#### func (S16) SizeBytes + +```go +func (v S16) SizeBytes() int +``` + +#### func (S16) String + +```go +func (v S16) String() string +``` + +#### func (S16) Unknown + +```go +func (v S16) Unknown() string +``` + +#### type S32 + +```go +type S32 int32 +``` + + +#### func (S32) Name + +```go +func (v S32) Name() string +``` + +#### func (S32) Read + +```go +func (v S32) Read(buffer []byte) DataType +``` + +#### func (S32) SizeBytes + +```go +func (v S32) SizeBytes() int +``` + +#### func (S32) String + +```go +func (v S32) String() string +``` + +#### func (S32) Unknown + +```go +func (v S32) Unknown() string +``` + +#### type S64 + +```go +type S64 int64 +``` + + +#### func (S64) Name + +```go +func (v S64) Name() string +``` + +#### func (S64) Read + +```go +func (v S64) Read(buffer []byte) DataType +``` + +#### func (S64) SizeBytes + +```go +func (v S64) SizeBytes() int +``` + +#### func (S64) String + +```go +func (v S64) String() string +``` + +#### func (S64) Unknown + +```go +func (v S64) Unknown() string +``` + +#### type S8 + +```go +type S8 int8 +``` + + +#### func (S8) Name + +```go +func (v S8) Name() string +``` + +#### func (S8) Read + +```go +func (v S8) Read(buffer []byte) DataType +``` + +#### func (S8) SizeBytes + +```go +func (v S8) SizeBytes() int +``` + +#### func (S8) String + +```go +func (v S8) String() string +``` + +#### func (S8) Unknown + +```go +func (v S8) Unknown() string +``` + +#### type StateAdapter + +```go +type StateAdapter struct { + StateAdapterItem + gxui.AdapterBase +} +``` + + +#### func CreateStateAdapter + +```go +func CreateStateAdapter(appCtx *ApplicationContext, state schema.Struct) *StateAdapter +``` + +#### func (*StateAdapter) Size + +```go +func (r *StateAdapter) Size(theme gxui.Theme) math.Size +``` + +#### type StateAdapterItem + +```go +type StateAdapterItem struct { +} +``` + + +#### func (*StateAdapterItem) Count + +```go +func (i *StateAdapterItem) Count() int +``` + +#### func (*StateAdapterItem) Create + +```go +func (i *StateAdapterItem) Create(t gxui.Theme, index int) gxui.Control +``` + +#### func (*StateAdapterItem) Init + +```go +func (i *StateAdapterItem) Init(appCtx *ApplicationContext, key string, value interface{}) +``` + +#### func (*StateAdapterItem) ItemAt + +```go +func (i *StateAdapterItem) ItemAt(index int) gxui.AdapterItem +``` + +#### func (*StateAdapterItem) ItemIndex + +```go +func (i *StateAdapterItem) ItemIndex(item gxui.AdapterItem) int +``` + +#### func (*StateAdapterItem) NodeAt + +```go +func (i *StateAdapterItem) NodeAt(index int) gxui.TreeNode +``` + +#### type TimingData + +```go +type TimingData struct { +} +``` + + +#### func NewTimingData + +```go +func NewTimingData(t service.TimingInfo) TimingData +``` + +#### func (TimingData) BarBrush + +```go +func (d TimingData) BarBrush(bar int, stack int, highlighted bool) gxui.Brush +``` + +#### func (TimingData) Count + +```go +func (d TimingData) Count() int +``` + +#### func (TimingData) LabelBackgroundBrush + +```go +func (d TimingData) LabelBackgroundBrush(bar int, stack int) gxui.Brush +``` + +#### func (TimingData) LabelTextColor + +```go +func (d TimingData) LabelTextColor(bar int, stack int) gxui.Color +``` + +#### func (TimingData) Limits + +```go +func (d TimingData) Limits() (int, int) +``` + +#### func (TimingData) Values + +```go +func (d TimingData) Values(i int) []int +``` + +#### type U16 + +```go +type U16 uint16 +``` + + +#### func (U16) Name + +```go +func (v U16) Name() string +``` + +#### func (U16) Read + +```go +func (v U16) Read(buffer []byte) DataType +``` + +#### func (U16) SizeBytes + +```go +func (v U16) SizeBytes() int +``` + +#### func (U16) String + +```go +func (v U16) String() string +``` + +#### func (U16) Unknown + +```go +func (v U16) Unknown() string +``` + +#### type U32 + +```go +type U32 uint32 +``` + + +#### func (U32) Name + +```go +func (v U32) Name() string +``` + +#### func (U32) Read + +```go +func (v U32) Read(buffer []byte) DataType +``` + +#### func (U32) SizeBytes + +```go +func (v U32) SizeBytes() int +``` + +#### func (U32) String + +```go +func (v U32) String() string +``` + +#### func (U32) Unknown + +```go +func (v U32) Unknown() string +``` + +#### type U64 + +```go +type U64 uint64 +``` + + +#### func (U64) Name + +```go +func (v U64) Name() string +``` + +#### func (U64) Read + +```go +func (v U64) Read(buffer []byte) DataType +``` + +#### func (U64) SizeBytes + +```go +func (v U64) SizeBytes() int +``` + +#### func (U64) String + +```go +func (v U64) String() string +``` + +#### func (U64) Unknown + +```go +func (v U64) Unknown() string +``` + +#### type U8 + +```go +type U8 uint8 +``` + + +#### func (U8) Name + +```go +func (v U8) Name() string +``` + +#### func (U8) Read + +```go +func (v U8) Read(buffer []byte) DataType +``` + +#### func (U8) SizeBytes + +```go +func (v U8) SizeBytes() int +``` + +#### func (U8) String + +```go +func (v U8) String() string +``` + +#### func (U8) Unknown + +```go +func (v U8) Unknown() string +``` diff --git a/_experimental/client/charts/README.md b/_experimental/client/charts/README.md new file mode 100644 index 000000000..07905e417 --- /dev/null +++ b/_experimental/client/charts/README.md @@ -0,0 +1,283 @@ +# charts +-- + import "android.googlesource.com/platform/tools/gpu/_experimental/client/charts" + + +## Usage + +```go +const ( + ScrollX = InputKind(iota) + ScrollY + DragX + DragY +) +``` + +```go +const ( + Nop = ActionKind(iota) + PanX + PanY + ZoomX + ZoomY + ZoomXY +) +``` + +```go +var DefaultGridlines = GridLines{ + Brush: gxui.CreateBrush(gxui.Gray40), + TextColor: gxui.Gray70, + Font: nil, + Format: func(v int) string { return fmt.Sprintf("%d", v) }, + Density: 30, + Multiples: []int{2, 5}, +} +``` + +#### type ActionKind + +```go +type ActionKind int +``` + + +#### func DefaultInputHandler + +```go +func DefaultInputHandler(input InputKind, o gxui.Orientation, ev gxui.MouseEvent) ActionKind +``` + +#### type BarChart + +```go +type BarChart struct { + base.Container + ZoomWindow + parts.BackgroundBorderPainter +} +``` + + +#### func NewBarChart + +```go +func NewBarChart(theme gxui.Theme) *BarChart +``` + +#### func (*BarChart) Click + +```go +func (c *BarChart) Click(e gxui.MouseEvent) bool +``` + +#### func (*BarChart) DesiredSize + +```go +func (c *BarChart) DesiredSize(min, max math.Size) math.Size +``` + +#### func (*BarChart) DoubleClick + +```go +func (c *BarChart) DoubleClick(e gxui.MouseEvent) bool +``` + +#### func (*BarChart) LayoutChildren + +```go +func (c *BarChart) LayoutChildren() +``` + +#### func (*BarChart) MouseMove + +```go +func (c *BarChart) MouseMove(e gxui.MouseEvent) +``` + +#### func (*BarChart) OnBarClicked + +```go +func (c *BarChart) OnBarClicked(f func(idx int, ev gxui.MouseEvent)) gxui.EventSubscription +``` + +#### func (*BarChart) OnBarDoubleClicked + +```go +func (c *BarChart) OnBarDoubleClicked(f func(idx int, ev gxui.MouseEvent)) gxui.EventSubscription +``` + +#### func (*BarChart) Orientation + +```go +func (c *BarChart) Orientation() gxui.Orientation +``` + +#### func (*BarChart) Paint + +```go +func (c *BarChart) Paint(canvas gxui.Canvas) +``` + +#### func (*BarChart) SetBarPen + +```go +func (c *BarChart) SetBarPen(pen gxui.Pen) +``` + +#### func (*BarChart) SetData + +```go +func (c *BarChart) SetData(data BarChartData) +``` + +#### func (*BarChart) SetGridlines + +```go +func (c *BarChart) SetGridlines(gridlines GridLines) +``` + +#### func (*BarChart) SetHighlightedBarPen + +```go +func (c *BarChart) SetHighlightedBarPen(pen gxui.Pen) +``` + +#### func (*BarChart) SetOrientation + +```go +func (c *BarChart) SetOrientation(o gxui.Orientation) +``` + +#### func (*BarChart) SetSize + +```go +func (c *BarChart) SetSize(s math.Size) +``` + +#### type BarChartData + +```go +type BarChartData interface { + Count() int + Values(bar int) []int + Limits() (int, int) + BarBrush(bar int, stack int, highlighted bool) gxui.Brush + LabelBackgroundBrush(bar int, stack int) gxui.Brush + LabelTextColor(bar int, stack int) gxui.Color +} +``` + + +#### type GridLines + +```go +type GridLines struct { + Brush gxui.Brush + TextColor gxui.Color + Font gxui.Font + Format func(int) string + Density int // DIPs per line + Multiples []int +} +``` + + +#### func (GridLines) PaintHorizontal + +```go +func (g GridLines) PaintHorizontal(theme gxui.Theme, canvas gxui.Canvas, zoomWindow math.Rect, viewBounds math.Rect) +``` + +#### func (GridLines) PaintVertical + +```go +func (g GridLines) PaintVertical(theme gxui.Theme, canvas gxui.Canvas, zoomWindow math.Rect, viewBounds math.Rect) +``` + +#### type InputHandler + +```go +type InputHandler func(InputKind, gxui.Orientation, gxui.MouseEvent) ActionKind +``` + + +#### type InputKind + +```go +type InputKind int +``` + + +#### type ZoomWindow + +```go +type ZoomWindow struct { + InputHandler InputHandler +} +``` + + +#### func (*ZoomWindow) Init + +```go +func (z *ZoomWindow) Init(outer ZoomWindowOuter, theme gxui.Theme) +``` + +#### func (*ZoomWindow) MouseDown + +```go +func (z *ZoomWindow) MouseDown(e gxui.MouseEvent) +``` + +#### func (*ZoomWindow) MouseMove + +```go +func (z *ZoomWindow) MouseMove(e gxui.MouseEvent) +``` + +#### func (*ZoomWindow) MouseScroll + +```go +func (z *ZoomWindow) MouseScroll(e gxui.MouseEvent) bool +``` + +#### func (*ZoomWindow) MouseUp + +```go +func (z *ZoomWindow) MouseUp(e gxui.MouseEvent) +``` + +#### func (*ZoomWindow) SetMinZoomWindowSize + +```go +func (z *ZoomWindow) SetMinZoomWindowSize(size math.Size) +``` + +#### func (*ZoomWindow) SetZoomBounds + +```go +func (z *ZoomWindow) SetZoomBounds(zoomBounds math.Rect) +``` + +#### func (*ZoomWindow) SetZoomWindow + +```go +func (z *ZoomWindow) SetZoomWindow(zoomWindow math.Rect) +``` + +#### func (*ZoomWindow) ViewBounds + +```go +func (z *ZoomWindow) ViewBounds() math.Rect +``` + +#### type ZoomWindowOuter + +```go +type ZoomWindowOuter interface { + base.ContainerOuter + Orientation() gxui.Orientation +} +``` diff --git a/_experimental/client/charts/samples/barchart/README.md b/_experimental/client/charts/samples/barchart/README.md new file mode 100644 index 000000000..fe9a53e26 --- /dev/null +++ b/_experimental/client/charts/samples/barchart/README.md @@ -0,0 +1,2 @@ +# barchart +-- diff --git a/_experimental/client/gapid/README.md b/_experimental/client/gapid/README.md new file mode 100644 index 000000000..06ec0629f --- /dev/null +++ b/_experimental/client/gapid/README.md @@ -0,0 +1,2 @@ +# gapid +-- diff --git a/_experimental/client/schema/README.md b/_experimental/client/schema/README.md new file mode 100644 index 000000000..fb9bfff75 --- /dev/null +++ b/_experimental/client/schema/README.md @@ -0,0 +1,252 @@ +# schema +-- + import "android.googlesource.com/platform/tools/gpu/_experimental/client/schema" + + +## Usage + +#### func AllEnumEntries + +```go +func AllEnumEntries(enum *service.EnumInfo) service.EnumEntryArray +``` +AllEnumEntries returns the flattened list of enum entries for the given EnumInfo +and all enums it extends. + +#### func DecodeAtoms + +```go +func DecodeAtoms(stream service.AtomStream, schema service.Schema) ([]Atom, error) +``` +DecodeAtoms decodes all atoms from the AtomStream stream. + +#### func IndexOfValue + +```go +func IndexOfValue(l service.EnumEntryArray, value uint32) int +``` +IndexOfValue returns the index of the enum entry with the specified value, or -1 +if no value exists in the array. + +#### func ReadType + +```go +func ReadType(ty service.TypeInfo, d binary.Decoder) (interface{}, error) +``` +ReadType reads the schema type ty from the decoder d. + +#### func WriteType + +```go +func WriteType(v interface{}, e binary.Encoder) error +``` +WriteType writes v to the encoder e. The value v must be one of the following +types: + + bool + int8 + uint8 + int16 + uint16 + int32 + uint32 + float32 + int64 + uint64 + float64 + string + EnumValue + Struct + Class + Array + Map + memory.Pointer + +#### type Array + +```go +type Array struct { + Type *service.ArrayInfo // The array type info. + Elements []ArrayElement // The array elements. +} +``` + +Array is a schema-typed Array value. + +#### func (Array) String + +```go +func (a Array) String() string +``` + +#### type ArrayElement + +```go +type ArrayElement interface{} +``` + +ArrayElement is a single element held by an Array. + +#### type Atom + +```go +type Atom struct { + Info service.AtomInfo + Observations Observations + Arguments []interface{} +} +``` + +Atom is a schema-typed Atom value. + +#### func UnpackAtom + +```go +func UnpackAtom(d binary.Decoder, i service.AtomInfo) (Atom, error) +``` +UnpackAtom unpacks and returns an Atom of the AtomInfo type from the decoder d. + +#### func (Atom) Pack + +```go +func (a Atom) Pack(e binary.Encoder) error +``` +Pack encodes the Atom to the encoder e. The Atom can be decoded using the Unpack +method of the atom's AtomInfo. + +#### type Class + +```go +type Class struct { + Type *service.ClassInfo // The class type info. + Fields []Field // The class field values. +} +``` + +Class is a schema-typed Class object instance. + +#### type EnumValue + +```go +type EnumValue struct { + Type *service.EnumInfo // The enum this value belongs to. + Value uint32 // The numerical value. +} +``` + +EnumValue is a schema-typed Enum value. Unlike EnumEntry, EnumValue can hold +values outside of the acceptable enum values. + +#### func (EnumValue) String + +```go +func (e EnumValue) String() string +``` + +#### type Field + +```go +type Field struct { + Info *service.FieldInfo // The field type info. + Value interface{} // The field value. +} +``` + +Field is a schema-typed Class or Struct field instance. + +#### type Map + +```go +type Map struct { + Type *service.MapInfo // The map type info. + Elements []MapElement // The map elements. +} +``` + +Map is a schema-typed Map value. + +#### type MapElement + +```go +type MapElement struct { + Key, Value interface{} +} +``` + +MapElement is a single key-value pair element held by a Map. + +#### type Observation + +```go +type Observation struct { + Range memory.Range // Memory range that was observed. + ID binary.ID // The resource identifier of the observed data. +} +``` + + +#### func (*Observation) Decode + +```go +func (o *Observation) Decode(d binary.Decoder) error +``` +Decode decodes an Observation structure from the decoder d. + +#### func (*Observation) Encode + +```go +func (o *Observation) Encode(e binary.Encoder) error +``` +Encode encodes an Observation structure to the encoder e. + +#### type Observations + +```go +type Observations struct { + Reads []Observation + Writes []Observation +} +``` + + +#### func (*Observations) Decode + +```go +func (o *Observations) Decode(d binary.Decoder) error +``` +Decode decodes an Observations structure from the decoder d. + +#### func (*Observations) Encode + +```go +func (o *Observations) Encode(e binary.Encoder) error +``` +Encode encodes an Observations structure to the encoder e. + +#### type StaticArray + +```go +type StaticArray struct { + Type *service.StaticArrayInfo // The static array type info. + Elements []ArrayElement // The static array elements. +} +``` + +StaticArray is a schema-typed StaticArray value. + +#### func (StaticArray) String + +```go +func (a StaticArray) String() string +``` + +#### type Struct + +```go +type Struct struct { + Type *service.StructInfo // The struct type info. + Fields []Field // The struct field values. +} +``` + +Struct is a schema-typed Struct object instance. diff --git a/adb/README.md b/adb/README.md new file mode 100644 index 000000000..cab08751a --- /dev/null +++ b/adb/README.md @@ -0,0 +1,306 @@ +# adb +-- + import "android.googlesource.com/platform/tools/gpu/adb" + +Package adb provides an interface to the Android Debug Bridge. + +## Usage + +```go +var ErrADBNotFound = errors.New("ADB command not found on PATH") +``` +ErrADBNotFound is returned when the ADB executable is not found. + +```go +var ErrDeviceNotRooted = errors.New("Device is not rooted") +``` +ErrDeviceNotRooted is returned by Device.Root when the device is running a +production build as is not 'rooted'. + +```go +var ErrDeviceUnauthorized = errors.New("Device unauthorized") +``` +ErrDeviceUnauthorized is returned by ADB commands when the device has not +authorized ADB debugging. Check the confirmation dialog on the device. + +#### func Devices + +```go +func Devices() ([]*Device, error) +``` +Devices returns the list of serial numbers of all the attached Android devices. + +#### type Action + +```go +type Action struct { + Name string // Example: android.intent.action.MAIN + Package *InstalledPackage + Activity string // Example: .FooBarActivity +} +``` + +Action represents an Android action that can be sent as an intent. + +#### func (*Action) String + +```go +func (a *Action) String() string +``` + +#### type Cmd + +```go +type Cmd struct { + // Path is the path of the command to run on the device. + // + // If the string is empty, the command is treated as a ADB command for Device. + Path string + + // Args holds the command line arguments to pass to the command. + Args []string + + // The device this command should be run on. If nil, then any one of the + // attached devices will execute the command. + Device *Device + + // Stdout and Stderr specify the process's standard output and error. + // + // If either is nil, Run connects the corresponding file descriptor + // to the null device (os.DevNull). + // + // If Stdout and Stderr are the same writer, at most one + // goroutine at a time will call Write. + Stdout io.Writer + Stderr io.Writer +} +``` + +Cmd represents a command that can be run on an Android device. + +#### func (*Cmd) Call + +```go +func (c *Cmd) Call() (string, error) +``` +Call starts the specified command and waits for it to complete, returning the +all stdout as a string. The returned error is nil if the command runs, has no +problems copying stdout and stderr, and exits with a zero exit status. + +#### func (*Cmd) Run + +```go +func (c *Cmd) Run() error +``` +Run starts the specified command and waits for it to complete. The returned +error is nil if the command runs, has no problems copying stdout and stderr, and +exits with a zero exit status. + +#### type Device + +```go +type Device struct { + Serial string + State DeviceState +} +``` + +Device represents an attached Android device. + +#### func (*Device) Abi + +```go +func (d *Device) Abi() string +``` +String returns a string representing the device. + +#### func (*Device) Command + +```go +func (d *Device) Command(path string, args ...string) *Cmd +``` +Command returns a new Cmd that will run the command with the specified name and +arguments on this device. + +#### func (*Device) Forward + +```go +func (d *Device) Forward(local, device Port) error +``` +Forward will forward the specified device Port to the specified local Port. + +#### func (*Device) InstalledPackages + +```go +func (d *Device) InstalledPackages() (Packages, error) +``` +InstalledPackages returns the sorted list of installed packages on the device. + +#### func (*Device) Pull + +```go +func (d *Device) Pull(remote, local string) error +``` +Pulls the remote file to the local one. + +#### func (*Device) Push + +```go +func (d *Device) Push(local, remote string) error +``` +Pushes the local file to the remote one. + +#### func (*Device) Root + +```go +func (d *Device) Root() error +``` +Root restarts adb as root. If the device is running a production build then Root +will return ErrDeviceNotRooted. + +#### func (*Device) SELinuxEnforcing + +```go +func (d *Device) SELinuxEnforcing() (bool, error) +``` +SELinuxEnforcing returns true if the device is currently in a SELinux enforcing +mode, or false if the device is currently in a SELinux permissive mode. + +#### func (*Device) SetSELinuxEnforcing + +```go +func (d *Device) SetSELinuxEnforcing(enforce bool) error +``` +SetSELinuxEnforcing changes the SELinux-enforcing mode. + +#### func (*Device) StartActivity + +```go +func (d *Device) StartActivity(a Action) error +``` +StartActivity launches the specified action. + +#### func (*Device) String + +```go +func (d *Device) String() string +``` +String returns a string representing the device. + +#### type DeviceState + +```go +type DeviceState int +``` + +DeviceState represents the last queried state of an Android device. + +```go +const ( + Offline DeviceState = iota + Online + Unauthorized +) +``` +binary: DeviceState#Offline = offline binary: DeviceState#Online = device +binary: DeviceState#Unauthorized = unauthorized + +#### func (*DeviceState) Parse + +```go +func (v *DeviceState) Parse(s string) error +``` + +#### func (DeviceState) String + +```go +func (v DeviceState) String() string +``` + +#### type InstalledPackage + +```go +type InstalledPackage struct { + Name string // Name of the package. + Device *Device // The device this package is installed on. + Actions []*Action // The actions this package supports. +} +``` + + +#### func (*InstalledPackage) SetWrapProperties + +```go +func (p *InstalledPackage) SetWrapProperties(props ...string) error +``` +WrapProperties sets the list of wrap-properties for the given installed package. + +#### func (*InstalledPackage) String + +```go +func (p *InstalledPackage) String() string +``` +String returns the package name. + +#### func (*InstalledPackage) WrapProperties + +```go +func (p *InstalledPackage) WrapProperties() ([]string, error) +``` +WrapProperties returns the list of wrap-properties for the given installed +package. + +#### type NamedAbstractSocket + +```go +type NamedAbstractSocket string +``` + +NamedAbstractSocket represents an abstract UNIX domain socket name on either the +local machine or Android device. NamedAbstractSocket implements the Port +interface. + +#### type Packages + +```go +type Packages []*InstalledPackage +``` + + +#### func (Packages) Len + +```go +func (l Packages) Len() int +``` + +#### func (Packages) Less + +```go +func (l Packages) Less(i, j int) bool +``` + +#### func (Packages) Swap + +```go +func (l Packages) Swap(i, j int) +``` + +#### type Port + +```go +type Port interface { + // contains filtered or unexported methods +} +``` + +Port is the interface for sockets ports that can be forwarded from an Android +Device to the local machine. + +#### type TCPPort + +```go +type TCPPort int +``` + +TCPPort represents a TCP/IP port on either the local machine or Android device. +TCPPort implements the Port interface. diff --git a/api/README.md b/api/README.md new file mode 100644 index 000000000..c17442fe7 --- /dev/null +++ b/api/README.md @@ -0,0 +1,67 @@ +# api +-- + import "android.googlesource.com/platform/tools/gpu/api" + +Package api holds the main interface to the api language libraries. It provides +functions for going from api files to abstract syntax trees and processed +semantic trees. + +## Usage + +```go +var DefaultProcessor = Processor{ + Parsed: map[string]*ast.API{}, + Resolved: map[string]*semantic.API{}, +} +``` +DefaultProcessor is the Processor used in the package level functions. Most +applications will not need multiple instances of a Processor, and can just use +this one. + +#### func Parse + +```go +func Parse(apiname string) (*ast.API, parse.ErrorList) +``` +Parse parses the api file with the DefaultProcessor. See Processor.Parse for +details. + +#### func Resolve + +```go +func Resolve(apiname string, mappings resolver.ASTToSemantic) (*semantic.API, parse.ErrorList) +``` +Resolve resolves the api file with the DefaultProcessor. See Processor.Resolve +for details. + +#### type Processor + +```go +type Processor struct { + Parsed map[string]*ast.API + Resolved map[string]*semantic.API +} +``` + +Processor holds the state when resolving multiple api files. + +#### func (*Processor) Parse + +```go +func (p *Processor) Parse(path string) (*ast.API, parse.ErrorList) +``` +Parse returns an ast that represents the supplied filename. It if the file has +already been parsed, the cached ast will be returned, otherwise it invokes +parser.Parse on the content of the supplied file name. + +#### func (*Processor) Resolve + +```go +func (p *Processor) Resolve(apiname string, mappings resolver.ASTToSemantic) (*semantic.API, parse.ErrorList) +``` +Resolve returns a semantic.API that represents the supplied api file name. If +the file has already been resolved, the cached semantic tree is returned, +otherwise the file and all dependant files are parsed using Processor.Parse. +Recursive calls are made to Resolve for all named imports, and then finally the +ast and all included ast's are handed to resolver.Resolve to do semantic +processing. diff --git a/binary/schema/README.md b/binary/schema/README.md new file mode 100644 index 000000000..3d60e6d48 --- /dev/null +++ b/binary/schema/README.md @@ -0,0 +1,1093 @@ +# schema +-- + import "android.googlesource.com/platform/tools/gpu/binary/schema" + +Package schema implements rtti for the binary system. + +## Usage + +#### type Array + +```go +type Array struct { + binary.Generate + Alias string // The alias this array type was given, if present + ValueType Type // The value type stored in the array + Size uint32 // The fixed size of the array +} +``` + +Array is the Type descriptor for fixed size buffers of known type. + +#### func (*Array) Basename + +```go +func (a *Array) Basename() string +``` + +#### func (*Array) Class + +```go +func (*Array) Class() binary.Class +``` + +#### func (*Array) Decode + +```go +func (a *Array) Decode(d binary.Decoder) (interface{}, error) +``` + +#### func (*Array) Encode + +```go +func (a *Array) Encode(e binary.Encoder, value interface{}) error +``` + +#### func (*Array) Skip + +```go +func (a *Array) Skip(d binary.Decoder) error +``` + +#### func (*Array) String + +```go +func (a *Array) String() string +``` + +#### func (*Array) Typename + +```go +func (a *Array) Typename() string +``` + +#### type Class + +```go +type Class struct { + binary.Generate + TypeID binary.ID // The unique type identifier for the Object. + Package string // The package that declared the struct. + Name string // The simple name of the Object. + Fields []Field // Descriptions of the fields of the Object. +} +``` + +Class represents an encodable object type with a type ID. + +#### func Lookup + +```go +func Lookup(id binary.ID) *Class +``` +Lookup looks up a Class by the given type id. If there is no match, it will +return nil. + +#### func (*Class) Class + +```go +func (*Class) Class() binary.Class +``` + +#### func (*Class) Decode + +```go +func (c *Class) Decode(d binary.Decoder) (binary.Object, error) +``` + +#### func (*Class) DecodeTo + +```go +func (c *Class) DecodeTo(d binary.Decoder, object binary.Object) error +``` + +#### func (*Class) Encode + +```go +func (c *Class) Encode(e binary.Encoder, object binary.Object) error +``` + +#### func (*Class) ID + +```go +func (c *Class) ID() binary.ID +``` + +#### func (*Class) New + +```go +func (c *Class) New() binary.Object +``` + +#### func (*Class) Skip + +```go +func (c *Class) Skip(d binary.Decoder) error +``` + +#### type Constants + +```go +type Constants []interface{} +``` + + +#### type Field + +```go +type Field struct { + binary.Generate + Declared string // The name of the field. + Type Type // The type stored in the field. +} +``` + +Field represents a name/type pair for a field in an Object. + +#### func (*Field) Class + +```go +func (*Field) Class() binary.Class +``` + +#### func (Field) Name + +```go +func (f Field) Name() string +``` + +#### type Int16Constant + +```go +type Int16Constant struct { + binary.Generate + Name string + Value int16 +} +``` + + +#### func (Int16Constant) Add + +```go +func (v Int16Constant) Add(c *Constants, t Type) +``` + +#### func (*Int16Constant) Class + +```go +func (*Int16Constant) Class() binary.Class +``` + +#### type Int16Constants + +```go +type Int16Constants struct { + binary.Generate + Type Type // The type of the constant. + Values []Int16Constant // The constant values +} +``` + + +#### func (*Int16Constants) Class + +```go +func (*Int16Constants) Class() binary.Class +``` + +#### func (Int16Constants) Len + +```go +func (s Int16Constants) Len() int +``` + +#### func (Int16Constants) Less + +```go +func (s Int16Constants) Less(i, j int) bool +``` + +#### func (Int16Constants) Swap + +```go +func (s Int16Constants) Swap(i, j int) +``` + +#### type Int32Constant + +```go +type Int32Constant struct { + binary.Generate + Name string + Value int32 +} +``` + + +#### func (Int32Constant) Add + +```go +func (v Int32Constant) Add(c *Constants, t Type) +``` + +#### func (*Int32Constant) Class + +```go +func (*Int32Constant) Class() binary.Class +``` + +#### type Int32Constants + +```go +type Int32Constants struct { + binary.Generate + Type Type // The type of the constant. + Values []Int32Constant // The constant values +} +``` + + +#### func (*Int32Constants) Class + +```go +func (*Int32Constants) Class() binary.Class +``` + +#### func (Int32Constants) Len + +```go +func (s Int32Constants) Len() int +``` + +#### func (Int32Constants) Less + +```go +func (s Int32Constants) Less(i, j int) bool +``` + +#### func (Int32Constants) Swap + +```go +func (s Int32Constants) Swap(i, j int) +``` + +#### type Int64Constant + +```go +type Int64Constant struct { + binary.Generate + Name string + Value int64 +} +``` + + +#### func (Int64Constant) Add + +```go +func (v Int64Constant) Add(c *Constants, t Type) +``` + +#### func (*Int64Constant) Class + +```go +func (*Int64Constant) Class() binary.Class +``` + +#### type Int64Constants + +```go +type Int64Constants struct { + binary.Generate + Type Type // The type of the constant. + Values []Int64Constant // The constant values +} +``` + + +#### func (*Int64Constants) Class + +```go +func (*Int64Constants) Class() binary.Class +``` + +#### func (Int64Constants) Len + +```go +func (s Int64Constants) Len() int +``` + +#### func (Int64Constants) Less + +```go +func (s Int64Constants) Less(i, j int) bool +``` + +#### func (Int64Constants) Swap + +```go +func (s Int64Constants) Swap(i, j int) +``` + +#### type Int8Constant + +```go +type Int8Constant struct { + binary.Generate + Name string + Value int8 +} +``` + + +#### func (Int8Constant) Add + +```go +func (v Int8Constant) Add(c *Constants, t Type) +``` + +#### func (*Int8Constant) Class + +```go +func (*Int8Constant) Class() binary.Class +``` + +#### type Int8Constants + +```go +type Int8Constants struct { + binary.Generate + Type Type // The type of the constant. + Values []Int8Constant // The constant values +} +``` + + +#### func (*Int8Constants) Class + +```go +func (*Int8Constants) Class() binary.Class +``` + +#### func (Int8Constants) Len + +```go +func (s Int8Constants) Len() int +``` + +#### func (Int8Constants) Less + +```go +func (s Int8Constants) Less(i, j int) bool +``` + +#### func (Int8Constants) Swap + +```go +func (s Int8Constants) Swap(i, j int) +``` + +#### type Interface + +```go +type Interface struct { + binary.Generate + Name string // The simple name of the type. +} +``` + +Interface is the Type descriptor for a field who's underlying type is dynamic. + +#### func (*Interface) Basename + +```go +func (i *Interface) Basename() string +``` + +#### func (*Interface) Class + +```go +func (*Interface) Class() binary.Class +``` + +#### func (*Interface) Decode + +```go +func (i *Interface) Decode(d binary.Decoder) (interface{}, error) +``` + +#### func (*Interface) Encode + +```go +func (i *Interface) Encode(e binary.Encoder, value interface{}) error +``` + +#### func (*Interface) Skip + +```go +func (i *Interface) Skip(d binary.Decoder) error +``` + +#### func (*Interface) String + +```go +func (i *Interface) String() string +``` + +#### func (*Interface) Typename + +```go +func (i *Interface) Typename() string +``` + +#### type Map + +```go +type Map struct { + binary.Generate + Alias string // The alias this array type was given, if present + KeyType Type // The key type used. + ValueType Type // The value type stored in the map. +} +``` + +Map is the Type descriptor for key/value stores. + +#### func (*Map) Basename + +```go +func (m *Map) Basename() string +``` + +#### func (*Map) Class + +```go +func (*Map) Class() binary.Class +``` + +#### func (*Map) Decode + +```go +func (m *Map) Decode(d binary.Decoder) (interface{}, error) +``` + +#### func (*Map) Encode + +```go +func (m *Map) Encode(e binary.Encoder, value interface{}) error +``` + +#### func (*Map) Skip + +```go +func (m *Map) Skip(d binary.Decoder) error +``` + +#### func (*Map) String + +```go +func (m *Map) String() string +``` + +#### func (*Map) Typename + +```go +func (m *Map) Typename() string +``` + +#### type Method + +```go +type Method int +``` + +Method denotes the encoding/decoding method a primitive type will use. + +```go +const ( + ID Method = iota + Bool + Int8 + Uint8 + Int16 + Uint16 + Int32 + Uint32 + Int64 + Uint64 + Float32 + Float64 + String +) +``` + +#### func ParseMethod + +```go +func ParseMethod(s string) (Method, error) +``` +This will convert a string to a Method, or return an error if the string was not +a valid method name. + +#### func (Method) Skippable + +```go +func (m Method) Skippable() bool +``` +Skippable returns true if the method has a complimentary skip method on the +decoder interface. If this is not true, the normal decoding method is used +during skipping. + +#### func (Method) String + +```go +func (m Method) String() string +``` + +#### type Object + +```go +type Object struct { + Fields []interface{} +} +``` + +Object is an instance of a Class. + +#### func (*Object) Class + +```go +func (o *Object) Class() binary.Class +``` +Class implements binary.Object using the schema system to do the encoding and +decoding of fields. + +#### type Pointer + +```go +type Pointer struct { + binary.Generate + Type Type // The pointed to type. +} +``` + +Pointer is the Type descriptor for pointers. + +#### func (*Pointer) Basename + +```go +func (p *Pointer) Basename() string +``` + +#### func (*Pointer) Class + +```go +func (*Pointer) Class() binary.Class +``` + +#### func (*Pointer) Decode + +```go +func (p *Pointer) Decode(d binary.Decoder) (interface{}, error) +``` + +#### func (*Pointer) Encode + +```go +func (p *Pointer) Encode(e binary.Encoder, value interface{}) error +``` + +#### func (*Pointer) Skip + +```go +func (p *Pointer) Skip(d binary.Decoder) error +``` + +#### func (*Pointer) String + +```go +func (p *Pointer) String() string +``` + +#### func (*Pointer) Typename + +```go +func (p *Pointer) Typename() string +``` + +#### type Primitive + +```go +type Primitive struct { + binary.Generate + Name string // The simple name of the type. + Method Method // The enocde/decode method to use. +} +``` + +Primitive is the kind for primitive types with corresponding direct methods on +Encoder and Decoder + +#### func (*Primitive) Basename + +```go +func (p *Primitive) Basename() string +``` + +#### func (*Primitive) Class + +```go +func (*Primitive) Class() binary.Class +``` + +#### func (*Primitive) Decode + +```go +func (p *Primitive) Decode(d binary.Decoder) (interface{}, error) +``` + +#### func (*Primitive) Encode + +```go +func (p *Primitive) Encode(e binary.Encoder, value interface{}) error +``` + +#### func (*Primitive) Native + +```go +func (p *Primitive) Native() string +``` +Native returns the go native type name for this primitive. + +#### func (*Primitive) Skip + +```go +func (p *Primitive) Skip(d binary.Decoder) error +``` +Implements binary.Class + +#### func (*Primitive) String + +```go +func (p *Primitive) String() string +``` + +#### func (*Primitive) Typename + +```go +func (p *Primitive) Typename() string +``` + +#### type Slice + +```go +type Slice struct { + binary.Generate + Alias string // The alias this array type was given, if present + ValueType Type // The value type stored in the slice. +} +``` + +Slice is the Type descriptor for dynamically sized buffers of known type, +encoded with a preceding count. + +#### func (*Slice) Basename + +```go +func (s *Slice) Basename() string +``` + +#### func (*Slice) Class + +```go +func (*Slice) Class() binary.Class +``` + +#### func (*Slice) Decode + +```go +func (s *Slice) Decode(d binary.Decoder) (interface{}, error) +``` + +#### func (*Slice) Encode + +```go +func (s *Slice) Encode(e binary.Encoder, value interface{}) error +``` + +#### func (*Slice) Skip + +```go +func (s *Slice) Skip(d binary.Decoder) error +``` + +#### func (*Slice) String + +```go +func (s *Slice) String() string +``` + +#### func (*Slice) Typename + +```go +func (s *Slice) Typename() string +``` + +#### type Stream + +```go +type Stream struct { + binary.Generate + Alias string // The alias this array type was given, if present + ValueType Type // The value type stored in the stream. +} +``` + +Stream is the Type descriptor for dynamically sized streams of a known type, +where the stream is terminated with a speical token rather than prefixed by a +count. + +#### func (*Stream) Basename + +```go +func (s *Stream) Basename() string +``` + +#### func (*Stream) Class + +```go +func (*Stream) Class() binary.Class +``` + +#### func (*Stream) Decode + +```go +func (s *Stream) Decode(d binary.Decoder) (interface{}, error) +``` + +#### func (*Stream) Encode + +```go +func (s *Stream) Encode(e binary.Encoder, value interface{}) error +``` + +#### func (*Stream) Skip + +```go +func (s *Stream) Skip(d binary.Decoder) error +``` + +#### func (*Stream) String + +```go +func (s *Stream) String() string +``` + +#### func (*Stream) Typename + +```go +func (s *Stream) Typename() string +``` + +#### type Struct + +```go +type Struct struct { + binary.Generate + Name string // The simple name of the type. + ID binary.ID // The unique type identifier for the Object. +} +``` + +Struct is the Type descriptor for an binary.Object typed value. + +#### func (*Struct) Basename + +```go +func (s *Struct) Basename() string +``` + +#### func (*Struct) Class + +```go +func (*Struct) Class() binary.Class +``` + +#### func (*Struct) Decode + +```go +func (s *Struct) Decode(d binary.Decoder) (interface{}, error) +``` + +#### func (*Struct) Encode + +```go +func (s *Struct) Encode(e binary.Encoder, value interface{}) error +``` + +#### func (*Struct) Skip + +```go +func (s *Struct) Skip(d binary.Decoder) error +``` + +#### func (*Struct) String + +```go +func (s *Struct) String() string +``` + +#### func (*Struct) Typename + +```go +func (s *Struct) Typename() string +``` + +#### type Type + +```go +type Type interface { + binary.Object + String() string + Encode(e binary.Encoder, value interface{}) error + Decode(d binary.Decoder) (interface{}, error) + Skip(d binary.Decoder) error + Typename() string + Basename() string +} +``` + +Type represents the common iterface to all type objects in the schema. + +#### type Uint16Constant + +```go +type Uint16Constant struct { + binary.Generate + Name string + Value uint16 +} +``` + + +#### func (Uint16Constant) Add + +```go +func (v Uint16Constant) Add(c *Constants, t Type) +``` + +#### func (*Uint16Constant) Class + +```go +func (*Uint16Constant) Class() binary.Class +``` + +#### type Uint16Constants + +```go +type Uint16Constants struct { + binary.Generate + Type Type // The type of the constant. + Values []Uint16Constant // The constant values +} +``` + + +#### func (*Uint16Constants) Class + +```go +func (*Uint16Constants) Class() binary.Class +``` + +#### func (Uint16Constants) Len + +```go +func (s Uint16Constants) Len() int +``` + +#### func (Uint16Constants) Less + +```go +func (s Uint16Constants) Less(i, j int) bool +``` + +#### func (Uint16Constants) Swap + +```go +func (s Uint16Constants) Swap(i, j int) +``` + +#### type Uint32Constant + +```go +type Uint32Constant struct { + binary.Generate + Name string + Value uint32 +} +``` + + +#### func (Uint32Constant) Add + +```go +func (v Uint32Constant) Add(c *Constants, t Type) +``` + +#### func (*Uint32Constant) Class + +```go +func (*Uint32Constant) Class() binary.Class +``` + +#### type Uint32Constants + +```go +type Uint32Constants struct { + binary.Generate + Type Type // The type of the constant. + Values []Uint32Constant // The constant values +} +``` + + +#### func (*Uint32Constants) Class + +```go +func (*Uint32Constants) Class() binary.Class +``` + +#### func (Uint32Constants) Len + +```go +func (s Uint32Constants) Len() int +``` + +#### func (Uint32Constants) Less + +```go +func (s Uint32Constants) Less(i, j int) bool +``` + +#### func (Uint32Constants) Swap + +```go +func (s Uint32Constants) Swap(i, j int) +``` + +#### type Uint64Constant + +```go +type Uint64Constant struct { + binary.Generate + Name string + Value uint64 +} +``` + + +#### func (Uint64Constant) Add + +```go +func (v Uint64Constant) Add(c *Constants, t Type) +``` + +#### func (*Uint64Constant) Class + +```go +func (*Uint64Constant) Class() binary.Class +``` + +#### type Uint64Constants + +```go +type Uint64Constants struct { + binary.Generate + Type Type // The type of the constant. + Values []Uint64Constant // The constant values +} +``` + + +#### func (*Uint64Constants) Class + +```go +func (*Uint64Constants) Class() binary.Class +``` + +#### func (Uint64Constants) Len + +```go +func (s Uint64Constants) Len() int +``` + +#### func (Uint64Constants) Less + +```go +func (s Uint64Constants) Less(i, j int) bool +``` + +#### func (Uint64Constants) Swap + +```go +func (s Uint64Constants) Swap(i, j int) +``` + +#### type Uint8Constant + +```go +type Uint8Constant struct { + binary.Generate + Name string + Value uint8 +} +``` + + +#### func (Uint8Constant) Add + +```go +func (v Uint8Constant) Add(c *Constants, t Type) +``` + +#### func (*Uint8Constant) Class + +```go +func (*Uint8Constant) Class() binary.Class +``` + +#### type Uint8Constants + +```go +type Uint8Constants struct { + binary.Generate + Type Type // The type of the constant. + Values []Uint8Constant // The constant values +} +``` + + +#### func (*Uint8Constants) Class + +```go +func (*Uint8Constants) Class() binary.Class +``` + +#### func (Uint8Constants) Len + +```go +func (s Uint8Constants) Len() int +``` + +#### func (Uint8Constants) Less + +```go +func (s Uint8Constants) Less(i, j int) bool +``` + +#### func (Uint8Constants) Swap + +```go +func (s Uint8Constants) Swap(i, j int) +``` diff --git a/device/README.md b/device/README.md new file mode 100644 index 000000000..f9b0874ef --- /dev/null +++ b/device/README.md @@ -0,0 +1,25 @@ +# device +-- + import "android.googlesource.com/platform/tools/gpu/device" + + +## Usage + +#### type Architecture + +```go +type Architecture struct { + PointerAlignment int // The alignment in bytes of a pointer type. + PointerSize int // The size in bytes of a pointer type. + IntegerSize int // The size in bytes of a int or unsigned int. + ByteOrder endian.ByteOrder // The byte ordering for the target. +} +``` + +Architecture holds architecture information about a device. + +#### func (Architecture) String + +```go +func (a Architecture) String() string +``` diff --git a/gapii/README.md b/gapii/README.md new file mode 100644 index 000000000..0fc7bafe7 --- /dev/null +++ b/gapii/README.md @@ -0,0 +1,25 @@ +# gapii +-- + import "android.googlesource.com/platform/tools/gpu/gapii" + +Package gapii provides functions for launching and communicating with the gapii +tracer. + +## Usage + +#### func AdbStart + +```go +func AdbStart(l log.Logger, a *adb.Action, spyport adb.Port) error +``` +AdbStart launches an activity on an android device with the gapii tracer +enabled. Gapii will attempt to connect back on the specified host port to write +the trace. + +#### func Capture + +```go +func Capture(logger log.Logger, port int, w io.Writer, stop chan struct{}) (int64, error) +``` +Capture opens up the specified port and then waits for a capture to be +delivered. It copies the capture into the supplied writer. diff --git a/tools/gapit/README.md b/tools/gapit/README.md new file mode 100644 index 000000000..5de5cdd77 --- /dev/null +++ b/tools/gapit/README.md @@ -0,0 +1,2 @@ +# gapit +-- |