feat(display): add reuse flag to Display protocol
- Add reuse parameter to Display.init() for all backends - PygameDisplay: reuse existing SDL window via class-level flag - TerminalDisplay: skip re-init when reuse=True - WebSocketDisplay: skip server start when reuse=True - SixelDisplay, KittyDisplay, NullDisplay: ignore reuse (not applicable) - MultiDisplay: pass reuse to child displays - Update benchmark.py to reuse pygame display for effect benchmarks - Add test_websocket_e2e.py with e2e marker - Register e2e marker in pyproject.toml
This commit is contained in:
@@ -5,8 +5,10 @@ Stream controller - manages input sources and orchestrates the render stream.
|
||||
from engine.config import Config, get_config
|
||||
from engine.display import (
|
||||
DisplayRegistry,
|
||||
KittyDisplay,
|
||||
MultiDisplay,
|
||||
NullDisplay,
|
||||
PygameDisplay,
|
||||
SixelDisplay,
|
||||
TerminalDisplay,
|
||||
WebSocketDisplay,
|
||||
@@ -38,6 +40,12 @@ def _get_display(config: Config):
|
||||
if display_mode == "sixel":
|
||||
displays.append(SixelDisplay())
|
||||
|
||||
if display_mode == "kitty":
|
||||
displays.append(KittyDisplay())
|
||||
|
||||
if display_mode == "pygame":
|
||||
displays.append(PygameDisplay())
|
||||
|
||||
if not displays:
|
||||
return NullDisplay()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user