Skip to content
Snippets Groups Projects
Verified Commit fa97a1bb authored by dos's avatar dos
Browse files

lower latency

parent 272017a3
Branches
No related tags found
No related merge requests found
...@@ -147,20 +147,19 @@ class Reactor: ...@@ -147,20 +147,19 @@ class Reactor:
self._top.think(hr, delta) self._top.think(hr, delta)
# Draw! # Draw!
if self._ctx is None and sys_display.pipe_available(): if sys_display.pipe_available() and not sys_display.pipe_full():
self._ctx = sys_display.ctx(0) ctx = sys_display.ctx(0)
if self._ctx is not None: if ctx is not None:
if self._last_ctx_get is not None: if self._last_ctx_get is not None:
diff = start - self._last_ctx_get diff = start - self._last_ctx_get
self.stats.record_render_time(diff) self.stats.record_render_time(diff)
self._last_ctx_get = start self._last_ctx_get = start
self._ctx.save() ctx.save()
self._top.draw(self._ctx) self._top.draw(ctx)
self._ctx.restore() ctx.restore()
if self._ctx is not None and not sys_display.pipe_full():
sys_display.update(self._ctx) sys_display.update(ctx)
self._ctx = None
# Share! # Share!
if ftop.run(delta): if ftop.run(delta):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment