fix(performance): use simple height estimation instead of PIL rendering

- Replace estimate_block_height (PIL-based) with estimate_simple_height (word wrap)
- Update viewport filter tests to match new height-based filtering (~4 items vs 24)
- Fix CI task duplication in mise.toml (remove redundant depends)

Closes #38
Closes #36
This commit is contained in:
2026-03-18 22:33:36 -07:00
parent abe49ba7d7
commit c57617bb3d
26 changed files with 3938 additions and 1956 deletions

View File

@@ -0,0 +1,43 @@
"""Stage adapters - Bridge existing components to the Stage interface.
This module provides adapters that wrap existing components
(EffectPlugin, Display, DataSource, Camera) as Stage implementations.
"""
from .camera import CameraStage
from .data_source import DataSourceStage, PassthroughStage, SourceItemsToBufferStage
from .display import DisplayStage
from .effect_plugin import EffectPluginStage
from .factory import (
create_stage_from_camera,
create_stage_from_display,
create_stage_from_effect,
create_stage_from_font,
create_stage_from_source,
)
from .transform import (
CanvasStage,
FontStage,
ImageToTextStage,
ViewportFilterStage,
)
__all__ = [
# Adapter classes
"EffectPluginStage",
"DisplayStage",
"DataSourceStage",
"PassthroughStage",
"SourceItemsToBufferStage",
"CameraStage",
"ViewportFilterStage",
"FontStage",
"ImageToTextStage",
"CanvasStage",
# Factory functions
"create_stage_from_display",
"create_stage_from_effect",
"create_stage_from_source",
"create_stage_from_camera",
"create_stage_from_font",
]