Files
gio/ui/internal/ops/ops.go
T
Elias Naur 1e38eec0ab ui: build paths as ops
Instead of allocating and constructing a clip path, store path data
directly in op lists. Use separate op lists for cached text layout
paths.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-06-02 22:18:04 +02:00

59 lines
1.2 KiB
Go

package ops
type OpType byte
// Start at a high number for easier debugging.
const FirstOpIndex = 200
const (
TypeBlockDef OpType = iota + FirstOpIndex
TypeBlock
TypeTransform
TypeLayer
TypeRedraw
TypeImage
TypeDraw
TypeColor
TypePointerHandler
TypeKeyHandler
TypeHideInput
TypePush
TypePop
TypeAux
TypeClip
)
const (
TypeBlockDefLen = 1 + 4 + 4
TypeBlockLen = 1 + 4 + 4 + 4
TypeTransformLen = 1 + 4*2
TypeLayerLen = 1
TypeRedrawLen = 1 + 8
TypeImageLen = 1 + 4*4
TypeDrawLen = 1 + 4*4
TypeColorLen = 1 + 4
TypePointerHandlerLen = 1 + 1
TypeKeyHandlerLen = 1 + 1
TypeHideInputLen = 1
TypePushLen = 1
TypePopLen = 1
TypeAuxLen = 1 + 4
TypeClipLen = 1 + 4*4
TypeBlockDefRefs = 0
TypeBlockRefs = 1
TypeTransformRefs = 0
TypeLayerRefs = 0
TypeRedrawRefs = 0
TypeImageRefs = 1
TypeDrawRefs = 0
TypeColorRefs = 0
TypePointerHandlerRefs = 2
TypeKeyHandlerRefs = 1
TypeHideInputRefs = 0
TypePushRefs = 0
TypePopRefs = 0
TypeAuxRefs = 0
TypeClipRefs = 0
)