mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
app: don't schedule a new frame for profiling events
Sometimes it's useful to profile yet not continously re-draw. If the programs wants the old behaviour, it can issue an InvalidateOp or call Window.Invalidate. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -145,7 +145,6 @@ func (w *Window) draw(size image.Point, frame *op.Ops) {
|
||||
q := 100 * time.Microsecond
|
||||
timings := fmt.Sprintf("tot:%7s cpu:%7s %s", frameDur.Round(q), drawDur.Round(q), w.gpu.Timings())
|
||||
w.queue.q.AddProfile(profile.Event{Timings: timings})
|
||||
w.setNextFrame(time.Time{})
|
||||
}
|
||||
if t, ok := w.queue.q.WakeupTime(); ok {
|
||||
w.setNextFrame(t)
|
||||
|
||||
Reference in New Issue
Block a user