The desktop rasterizer loads, decodes and smooth-copies file pictures once a program first asks a picture's size, which every widget that draws one does first, so vector icons and managed pixels draw without decoders, threads or asset paths. LanczosSnap is geometry's RectangleSnap, so a texture draw no longer reaches the Lanczos cache. A button reaches file pictures and atlas icons through the new image_lookup. kryon/image is now image_files, which re-exports the Image widget (image) and fills the pictures; kryon/icon fills the atlas. Library code imports image itself, so importing a picture-capable widget registers nothing. Navigation, copy and confirm buttons and the widget host fill the lookup where they draw, as they reached pictures before. Props modules that only name Image.Props import image_props, now also exported; unused image imports are gone. The frame and the accessibility host reach text requests and editor focus through text_editing, which text_request and text_input_platform fill, and the frame samples scrolls through scroll_sampling, which scroll_device fills. Desktop examples (C files, C bytes, executable), before -> after: button 96, 1 411 582, 448 264 -> 70, 980 794, 342 016 text 95, 1 445 077, 462 504 -> 71, 1 020 207, 356 472 textfield 107, 1 580 157, 514 496 -> 84, 1 166 840, 409 840 make pay-per-import-test checks button and textfield; tests whose programs no longer reach pictures lose their picture bindings and stubs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
48 lines
2.1 KiB
JSON
48 lines
2.1 KiB
JSON
{
|
|
"name": "Kryon widgets",
|
|
"repository": "https://github.com/kryonlabs/kryon",
|
|
"source": "tests/widget_benchmarks.zi",
|
|
"sources": [
|
|
"tests/widget_benchmarks.zi",
|
|
"tests/widget_benchmark_host.zi",
|
|
"tests/system_clipboard_host.zi"
|
|
],
|
|
"bindings": [
|
|
"system_clipboard:SystemClipboardOpenHost=system_clipboard_host:SystemClipboardOpenHost",
|
|
"system_clipboard:SystemClipboardByteHost=system_clipboard_host:SystemClipboardByteHost",
|
|
"system_clipboard:SystemClipboardWriteHost=system_clipboard_host:SystemClipboardWriteHost",
|
|
"kryon/font_metrics:MeasureGlyphWidth=widget_benchmark_host:MeasureGlyphWidth",
|
|
"kryon/font_metrics:MeasureGlyphLineHeight=widget_benchmark_host:MeasureGlyphLineHeight",
|
|
"kryon/raster_text:RasterText=widget_benchmark_host:RasterText",
|
|
"kryon/raster_text:RasterTextClipped=widget_benchmark_host:RasterTextClipped",
|
|
"kryon/raster_text:RasterTextRotated=widget_benchmark_host:RasterTextRotated",
|
|
"kryon/raster_shape:RasterRoundedRectangle=widget_benchmark_host:RasterRoundedRectangle",
|
|
"kryon/raster_shape:RasterRoundedRectangleOutline=widget_benchmark_host:RasterRoundedRectangleOutline",
|
|
"kryon/raster:RasterLine=widget_benchmark_host:RasterLine",
|
|
"kryon/paint_queue:RasterImage=widget_benchmark_host:RasterImage",
|
|
"kryon/paint_queue:RasterImageMesh=widget_benchmark_host:RasterImageMesh",
|
|
"kryon/raster_triangles:RasterTriangles=widget_benchmark_host:RasterTriangles"
|
|
],
|
|
"methodology": "Two frames per entry: public widget layout, interaction and paint-command generation. Deterministic monospace metrics and a recording paint host consume payloads. Pixel rasterization, system fonts and OS I/O are excluded. Sessions are retained between calls; each scenario verifies its behavior and returns zero on success.",
|
|
"cases": [
|
|
{
|
|
"id": "button",
|
|
"title": "Button",
|
|
"entry": "ButtonCase",
|
|
"expected": "0"
|
|
},
|
|
{
|
|
"id": "text",
|
|
"title": "Text",
|
|
"entry": "TextCase",
|
|
"expected": "0"
|
|
},
|
|
{
|
|
"id": "input",
|
|
"title": "Input",
|
|
"entry": "InputCase",
|
|
"expected": "0"
|
|
}
|
|
]
|
|
}
|