surfacecontrol

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package surfacecontrol provides Go bindings for Android SurfaceControl.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ARect

type ARect = capi.ARect

type ASurfaceTransaction_OnCommit

type ASurfaceTransaction_OnCommit = capi.ASurfaceTransaction_OnCommit

type AVsyncId

type AVsyncId = capi.AVsyncId

type Error

type Error int32

Error represents an NDK error code.

func (Error) Error

func (e Error) Error() string

type HdrMetadataType

type HdrMetadataType int32
const (
	HDR10_SMPTE2086 HdrMetadataType = 1
	HDR10_CTA861_3  HdrMetadataType = 2
	HDR10PLUS_SEI   HdrMetadataType = 3
)

type SurfaceControl

type SurfaceControl struct {
	// contains filtered or unexported fields
}

SurfaceControl wraps the NDK ASurfaceControl handle.

func NewSurfaceControlFromPointer

func NewSurfaceControlFromPointer(ptr unsafe.Pointer) *SurfaceControl

NewSurfaceControlFromPointer wraps a raw ASurfaceControl pointer.

func (*SurfaceControl) Acquire

func (h *SurfaceControl) Acquire()

Acquire calls the underlying NDK function.

func (*SurfaceControl) Close

func (h *SurfaceControl) Close() error

Close releases the underlying NDK handle.

func (*SurfaceControl) CreateChild

func (h *SurfaceControl) CreateChild(debug_name string) *SurfaceControl

CreateChild creates a new SurfaceControl from this SurfaceControl.

func (*SurfaceControl) Pointer

func (h *SurfaceControl) Pointer() unsafe.Pointer

Pointer returns the underlying pointer as unsafe.Pointer.

type SurfaceTransactionStats

type SurfaceTransactionStats struct {
	// contains filtered or unexported fields
}

SurfaceTransactionStats wraps the NDK ASurfaceTransactionStats handle.

func NewSurfaceTransactionStatsFromPointer

func NewSurfaceTransactionStatsFromPointer(ptr unsafe.Pointer) *SurfaceTransactionStats

NewSurfaceTransactionStatsFromPointer wraps a raw ASurfaceTransactionStats pointer.

func (*SurfaceTransactionStats) GetAcquireTime

func (h *SurfaceTransactionStats) GetAcquireTime(surface_control *SurfaceControl) int64

GetAcquireTime returns the value directly.

func (*SurfaceTransactionStats) GetLatchTime

func (h *SurfaceTransactionStats) GetLatchTime() int64

GetLatchTime returns the value directly.

func (*SurfaceTransactionStats) GetPresentFenceFd

func (h *SurfaceTransactionStats) GetPresentFenceFd() error

GetPresentFenceFd calls the underlying NDK function.

func (*SurfaceTransactionStats) GetPreviousReleaseFenceFd

func (h *SurfaceTransactionStats) GetPreviousReleaseFenceFd(surface_control *SurfaceControl) error

GetPreviousReleaseFenceFd calls the underlying NDK function.

func (*SurfaceTransactionStats) Pointer

func (h *SurfaceTransactionStats) Pointer() unsafe.Pointer

Pointer returns the underlying pointer as unsafe.Pointer.

type Transaction

type Transaction struct {
	// contains filtered or unexported fields
}

Transaction wraps the NDK ASurfaceTransaction handle.

func NewTransaction

func NewTransaction() *Transaction

NewTransaction creates a new Transaction.

func NewTransactionFromPointer

func NewTransactionFromPointer(ptr unsafe.Pointer) *Transaction

NewTransactionFromPointer wraps a raw ASurfaceTransaction pointer.

func (*Transaction) Apply

func (h *Transaction) Apply()

Apply calls the underlying NDK function.

func (*Transaction) ClearFrameRate

func (h *Transaction) ClearFrameRate(surface_control *SurfaceControl)

ClearFrameRate calls the underlying NDK function.

func (*Transaction) Close

func (h *Transaction) Close() error

Close releases the underlying NDK handle.

func (*Transaction) Pointer

func (h *Transaction) Pointer() unsafe.Pointer

Pointer returns the underlying pointer as unsafe.Pointer.

func (*Transaction) Reparent

func (h *Transaction) Reparent(surface_control *SurfaceControl, new_parent *SurfaceControl)

Reparent calls the underlying NDK function.

func (*Transaction) SetBufferAlpha

func (h *Transaction) SetBufferAlpha(surface_control *SurfaceControl, alpha float32) *Transaction

SetBufferAlpha sets a property and returns the receiver for chaining.

func (*Transaction) SetBufferTransform

func (h *Transaction) SetBufferTransform(surface_control *SurfaceControl, transform int32)

SetBufferTransform calls the underlying NDK function.

func (*Transaction) SetCrop

func (h *Transaction) SetCrop(surface_control *SurfaceControl, crop *ARect) *Transaction

SetCrop sets a property and returns the receiver for chaining.

func (*Transaction) SetDamageRegion

func (h *Transaction) SetDamageRegion(surface_control *SurfaceControl, rects *ARect, count uint32) *Transaction

SetDamageRegion sets a property and returns the receiver for chaining.

func (*Transaction) SetDesiredHdrHeadroom

func (h *Transaction) SetDesiredHdrHeadroom(surface_control *SurfaceControl, desiredHeadroom float32)

SetDesiredHdrHeadroom calls the underlying NDK function.

func (*Transaction) SetDesiredPresentTime

func (h *Transaction) SetDesiredPresentTime(desiredPresentTime int64)

SetDesiredPresentTime calls the underlying NDK function.

func (*Transaction) SetEnableBackPressure

func (h *Transaction) SetEnableBackPressure(surface_control *SurfaceControl, enableBackPressure bool)

SetEnableBackPressure calls the underlying NDK function.

func (*Transaction) SetExtendedRangeBrightness

func (h *Transaction) SetExtendedRangeBrightness(surface_control *SurfaceControl, currentBufferRatio float32, desiredRatio float32)

SetExtendedRangeBrightness calls the underlying NDK function.

func (*Transaction) SetFrameRate

func (h *Transaction) SetFrameRate(surface_control *SurfaceControl, frameRate float32, compatibility int8)

SetFrameRate calls the underlying NDK function.

func (*Transaction) SetFrameRateWithChangeStrategy

func (h *Transaction) SetFrameRateWithChangeStrategy(surface_control *SurfaceControl, frameRate float32, compatibility int8, changeFrameRateStrategy int8)

SetFrameRateWithChangeStrategy calls the underlying NDK function.

func (*Transaction) SetGeometry

func (h *Transaction) SetGeometry(surface_control *SurfaceControl, source *ARect, destination *ARect, transform int32)

SetGeometry calls the underlying NDK function.

func (*Transaction) SetPosition

func (h *Transaction) SetPosition(surface_control *SurfaceControl, x int32, y int32) *Transaction

SetPosition sets a property and returns the receiver for chaining.

func (*Transaction) SetScale

func (h *Transaction) SetScale(surface_control *SurfaceControl, xScale float32, yScale float32) *Transaction

SetScale sets a property and returns the receiver for chaining.

func (*Transaction) SetZOrder

func (h *Transaction) SetZOrder(surface_control *SurfaceControl, z_order int32) *Transaction

SetZOrder sets a property and returns the receiver for chaining.

type Transparency

type Transparency int32
const (
	Transparent Transparency = 0
	Translucent Transparency = 1
	Opaque      Transparency = 2
)

type Visibility

type Visibility int32
const (
	Hide Visibility = 0
	Show Visibility = 1
)

Jump to

Keyboard shortcuts

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