Documentation
¶
Overview ¶
Package pixconv converts the premultiplied RGBA frames the compositor produces into the pixel layouts native window systems want. It is shared by the X11 and Win32 shells and tested on every platform.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertRect ¶
func ConvertRect(dst []byte, dstStride int, pix []byte, srcStride, ox, oy, x0, y0, x1, y1 int, rgbx bool)
ConvertRect copies the pixel rectangle [x0,x1)x[y0,y1) from a premultiplied RGBA image (pix, stride, origin ox,oy) into the shadow buffer (same window coordinates, dstStride bytes per row), swapping to BGRX unless rgbx is set.
func SwapRB ¶
func SwapRB(dst, src []byte)
SwapRB converts premultiplied RGBA (bytes R,G,B,A) to the X server's little-endian 32-bpp TrueColor layout (bytes B,G,R,A; A is the ignored pad byte of a depth-24 visual). dst and src must have equal length, a multiple of 4. Two pixels are processed per 64-bit word when both slices are 8-byte aligned (the common case: row starts of Go images and of the page-aligned SHM segment); otherwise 32-bit/byte-wise paths are used.
func Unpremultiply ¶
func Unpremultiply(pix []byte)
Unpremultiply converts premultiplied RGBA to straight (non-premultiplied) RGBA in place, as icon APIs expect.
Types ¶
This section is empty.