Documentation
¶
Overview ¶
Package cpuimport is the CPU driver of the extimage contract: over any driver.Device, it maps a frame's memory, converts it to sRGB RGBA and uploads it. Every device draws frames this way when it has no importer of its own, or for a tuple its importer does not list.
Index ¶
- type Importer
- func (im *Importer) ExternalTuples() []extimage.Tuple
- func (im *Importer) ImportExternal(d extimage.Desc, minFilter, magFilter driver.TextureFilter) (driver.Texture, error)
- func (im *Importer) ReleaseExternal(t driver.Texture)
- func (im *Importer) UpdateExternal(t driver.Texture, d extimage.Desc) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Importer ¶
type Importer struct {
// contains filtered or unexported fields
}
Importer is the CPU driver. It is used on the renderer's goroutine only.
func (*Importer) ExternalTuples ¶
ExternalTuples are memory frames of every format, and the platform's own kinds it can map (platformTuples): a CPU path, never zero-copy.
func (*Importer) ImportExternal ¶
func (im *Importer) ImportExternal(d extimage.Desc, minFilter, magFilter driver.TextureFilter) (driver.Texture, error)
ImportExternal uploads the whole of d into a texture of its size: a pooled one if one is idle.
func (*Importer) ReleaseExternal ¶
ReleaseExternal pools t for reuse, or frees it when its pool is full. The renderer calls it once no submission samples t.