Documentation
¶
Index ¶
- Constants
- type AllocationError
- type AllocationResult
- type AllocatorProxy
- func (p *AllocatorProxy) Allocate(ctx context.Context, descriptor []byte, count int32) (AllocationResult, error)
- func (p *AllocatorProxy) Allocate2(ctx context.Context, descriptor BufferDescriptorInfo, count int32) (AllocationResult, error)
- func (p *AllocatorProxy) AsBinder() binder.IBinder
- func (p *AllocatorProxy) GetIMapperLibrarySuffix(ctx context.Context) (string, error)
- func (p *AllocatorProxy) IsSupported(ctx context.Context, descriptor BufferDescriptorInfo) (bool, error)
- type AllocatorStub
- type BufferDescriptorInfo
- type IAllocator
- type IAllocatorServer
Constants ¶
View Source
const ( TransactionIAllocatorAllocate = binder.FirstCallTransaction + 0 TransactionIAllocatorAllocate2 = binder.FirstCallTransaction + 1 TransactionIAllocatorIsSupported = binder.FirstCallTransaction + 2 TransactionIAllocatorGetIMapperLibrarySuffix = binder.FirstCallTransaction + 3 )
View Source
const ( MethodIAllocatorAllocate = "allocate" MethodIAllocatorAllocate2 = "allocate2" MethodIAllocatorIsSupported = "isSupported" MethodIAllocatorGetIMapperLibrarySuffix = "getIMapperLibrarySuffix" )
View Source
const DescriptorIAllocator = "android.hardware.graphics.allocator.IAllocator"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocationError ¶
type AllocationError int32
const ( AllocationErrorBadDescriptor AllocationError = 0 AllocationErrorNoResources AllocationError = 1 AllocationErrorUNSUPPORTED AllocationError = 2 )
type AllocationResult ¶
type AllocationResult struct {
Stride int32
Buffers []common.NativeHandle
}
func (*AllocationResult) MarshalParcel ¶
func (s *AllocationResult) MarshalParcel( p *parcel.Parcel, ) error
func (*AllocationResult) UnmarshalParcel ¶
func (s *AllocationResult) UnmarshalParcel( p *parcel.Parcel, ) error
type AllocatorProxy ¶
func NewAllocatorProxy ¶
func NewAllocatorProxy( remote binder.IBinder, ) *AllocatorProxy
func (*AllocatorProxy) Allocate ¶
func (p *AllocatorProxy) Allocate( ctx context.Context, descriptor []byte, count int32, ) (AllocationResult, error)
func (*AllocatorProxy) Allocate2 ¶
func (p *AllocatorProxy) Allocate2( ctx context.Context, descriptor BufferDescriptorInfo, count int32, ) (AllocationResult, error)
func (*AllocatorProxy) AsBinder ¶
func (p *AllocatorProxy) AsBinder() binder.IBinder
func (*AllocatorProxy) GetIMapperLibrarySuffix ¶
func (p *AllocatorProxy) GetIMapperLibrarySuffix( ctx context.Context, ) (string, error)
func (*AllocatorProxy) IsSupported ¶
func (p *AllocatorProxy) IsSupported( ctx context.Context, descriptor BufferDescriptorInfo, ) (bool, error)
type AllocatorStub ¶
type AllocatorStub struct {
Impl IAllocator
Transport binder.VersionAwareTransport
}
AllocatorStub dispatches incoming binder transactions to a typed IAllocator implementation.
func (*AllocatorStub) Descriptor ¶
func (s *AllocatorStub) Descriptor() string
func (*AllocatorStub) OnTransaction ¶
func (s *AllocatorStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type BufferDescriptorInfo ¶
type BufferDescriptorInfo struct {
Name []byte
Width int32
Height int32
LayerCount int32
Format common.PixelFormat
Usage common.BufferUsage
ReservedSize int64
AdditionalOptions []common.ExtendableType
}
func (*BufferDescriptorInfo) MarshalParcel ¶
func (s *BufferDescriptorInfo) MarshalParcel( p *parcel.Parcel, ) error
func (*BufferDescriptorInfo) UnmarshalParcel ¶
func (s *BufferDescriptorInfo) UnmarshalParcel( p *parcel.Parcel, ) error
type IAllocator ¶
type IAllocator interface {
AsBinder() binder.IBinder
Allocate(ctx context.Context, descriptor []byte, count int32) (AllocationResult, error)
Allocate2(ctx context.Context, descriptor BufferDescriptorInfo, count int32) (AllocationResult, error)
IsSupported(ctx context.Context, descriptor BufferDescriptorInfo) (bool, error)
GetIMapperLibrarySuffix(ctx context.Context) (string, error)
}
func NewAllocatorStub ¶
func NewAllocatorStub( impl IAllocatorServer, ) IAllocator
NewAllocatorStub creates a server-side IAllocator wrapping the given server implementation. The returned value satisfies IAllocator and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.
type IAllocatorServer ¶
type IAllocatorServer interface {
Allocate(ctx context.Context, descriptor []byte, count int32) (AllocationResult, error)
Allocate2(ctx context.Context, descriptor BufferDescriptorInfo, count int32) (AllocationResult, error)
IsSupported(ctx context.Context, descriptor BufferDescriptorInfo) (bool, error)
GetIMapperLibrarySuffix(ctx context.Context) (string, error)
}
IAllocatorServer is the server-side interface that user implementations provide to NewAllocatorStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
Click to show internal directories.
Click to hide internal directories.