mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
gpu,app: don't call time.Now when not profiling
runtime.nanotime1 shows up in profiles on Android, so avoid calling time.Now when we can. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -362,8 +362,8 @@ func (g *gpu) collect(viewport image.Point, frameOps *op.Ops) {
|
||||
g.renderer.pather.viewport = viewport
|
||||
g.drawOps.reset(viewport)
|
||||
g.drawOps.collect(frameOps, viewport)
|
||||
g.frameStart = time.Now()
|
||||
if g.drawOps.profile && g.timers == nil && g.ctx.Caps().Features.Has(driver.FeatureTimers) {
|
||||
g.frameStart = time.Now()
|
||||
g.timers = newTimers(g.ctx)
|
||||
g.stencilTimer = g.timers.newTimer()
|
||||
g.coverTimer = g.timers.newTimer()
|
||||
|
||||
Reference in New Issue
Block a user