mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 18:35:34 +00:00
io/router: remove redundant field
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-4
@@ -40,7 +40,6 @@ type Router struct {
|
|||||||
wakeupTime time.Time
|
wakeupTime time.Time
|
||||||
|
|
||||||
// ProfileOp summary.
|
// ProfileOp summary.
|
||||||
profiling bool
|
|
||||||
profHandlers map[event.Tag]struct{}
|
profHandlers map[event.Tag]struct{}
|
||||||
profile profile.Event
|
profile profile.Event
|
||||||
}
|
}
|
||||||
@@ -66,7 +65,6 @@ func (q *Router) Events(k event.Tag) []event.Event {
|
|||||||
func (q *Router) Frame(ops *op.Ops) {
|
func (q *Router) Frame(ops *op.Ops) {
|
||||||
q.handlers.Clear()
|
q.handlers.Clear()
|
||||||
q.wakeup = false
|
q.wakeup = false
|
||||||
q.profiling = false
|
|
||||||
for k := range q.profHandlers {
|
for k := range q.profHandlers {
|
||||||
delete(q.profHandlers, k)
|
delete(q.profHandlers, k)
|
||||||
}
|
}
|
||||||
@@ -134,7 +132,6 @@ func (q *Router) collect() {
|
|||||||
if q.profHandlers == nil {
|
if q.profHandlers == nil {
|
||||||
q.profHandlers = make(map[event.Tag]struct{})
|
q.profHandlers = make(map[event.Tag]struct{})
|
||||||
}
|
}
|
||||||
q.profiling = true
|
|
||||||
q.profHandlers[op.Tag] = struct{}{}
|
q.profHandlers[op.Tag] = struct{}{}
|
||||||
case opconst.TypeClipboardRead:
|
case opconst.TypeClipboardRead:
|
||||||
q.cqueue.ProcessReadClipboard(encOp.Data, encOp.Refs)
|
q.cqueue.ProcessReadClipboard(encOp.Data, encOp.Refs)
|
||||||
@@ -147,7 +144,7 @@ func (q *Router) collect() {
|
|||||||
// Profiling reports whether there was profile handlers in the
|
// Profiling reports whether there was profile handlers in the
|
||||||
// most recent Frame call.
|
// most recent Frame call.
|
||||||
func (q *Router) Profiling() bool {
|
func (q *Router) Profiling() bool {
|
||||||
return q.profiling
|
return len(q.profHandlers) > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// WakeupTime returns the most recent time for doing another frame,
|
// WakeupTime returns the most recent time for doing another frame,
|
||||||
|
|||||||
Reference in New Issue
Block a user