forked from joejulian/gio
ui/input/system: introduce package for system events
And add ProfileOp and ProfileEvent for registering and receiving profile data. Remove the Profiling field and Timings method from app.Window. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -23,6 +23,7 @@ const (
|
||||
TypePop
|
||||
TypeAux
|
||||
TypeClip
|
||||
TypeProfile
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -43,6 +44,7 @@ const (
|
||||
TypePopLen = 1
|
||||
TypeAuxLen = 1 + 4
|
||||
TypeClipLen = 1 + 4*4
|
||||
TypeProfileLen = 1
|
||||
)
|
||||
|
||||
func (t OpType) Size() int {
|
||||
@@ -64,12 +66,13 @@ func (t OpType) Size() int {
|
||||
TypePopLen,
|
||||
TypeAuxLen,
|
||||
TypeClipLen,
|
||||
TypeProfileLen,
|
||||
}[t-firstOpIndex]
|
||||
}
|
||||
|
||||
func (t OpType) NumRefs() int {
|
||||
switch t {
|
||||
case TypeBlock, TypeImage, TypeKeyHandler, TypePointerHandler:
|
||||
case TypeBlock, TypeImage, TypeKeyHandler, TypePointerHandler, TypeProfile:
|
||||
return 1
|
||||
default:
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user