xbintsc 0.5.37 → 0.5.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/cli/help.d.ts +1 -1
- package/dist/src/codegen/generator/module.js +23 -7
- package/dist/src/codegen/generator/module.js.map +1 -1
- package/dist/src/codegen/generator/state.js +1 -0
- package/dist/src/codegen/generator/state.js.map +1 -1
- package/dist/src/codegen/generator/tables.js +1 -0
- package/dist/src/codegen/generator/tables.js.map +1 -1
- package/dist/src/driver/bundler/deferred.d.ts +63 -0
- package/dist/src/driver/bundler/deferred.js +279 -0
- package/dist/src/driver/bundler/deferred.js.map +1 -0
- package/dist/src/driver/bundler/merge.js +214 -2
- package/dist/src/driver/bundler/merge.js.map +1 -1
- package/dist/src/driver/runtime-objects.d.ts +1 -1
- package/dist/src/driver/runtime-objects.js +1 -0
- package/dist/src/driver/runtime-objects.js.map +1 -1
- package/dist/src/driver/version.d.ts +1 -1
- package/dist/src/driver/version.js +1 -1
- package/dist/src/extensions/gui/html.js +98 -15
- package/dist/src/extensions/gui/html.js.map +1 -1
- package/dist/src/extensions/gui/index.js +1 -0
- package/dist/src/extensions/gui/index.js.map +1 -1
- package/dist/src/extensions/gui/three.d.ts +4 -3
- package/dist/src/extensions/gui/three.js +4 -3
- package/dist/src/extensions/gui/three.js.map +1 -1
- package/dist/tests/codegen/closures.test.js +7 -0
- package/dist/tests/codegen/closures.test.js.map +1 -1
- package/dist/tests/e2e/compile-objects-classes.test.js +31 -0
- package/dist/tests/e2e/compile-objects-classes.test.js.map +1 -1
- package/dist/tests/e2e/gui-canvas-state.test.d.ts +9 -0
- package/dist/tests/e2e/gui-canvas-state.test.js +297 -0
- package/dist/tests/e2e/gui-canvas-state.test.js.map +1 -0
- package/dist/tests/e2e/gui-draw-perf.test.d.ts +22 -0
- package/dist/tests/e2e/gui-draw-perf.test.js +405 -0
- package/dist/tests/e2e/gui-draw-perf.test.js.map +1 -0
- package/dist/tests/e2e/gui-perf.test.d.ts +23 -0
- package/dist/tests/e2e/gui-perf.test.js +283 -0
- package/dist/tests/e2e/gui-perf.test.js.map +1 -0
- package/dist/tests/e2e/gui-script-import-order.test.d.ts +10 -0
- package/dist/tests/e2e/gui-script-import-order.test.js +169 -0
- package/dist/tests/e2e/gui-script-import-order.test.js.map +1 -0
- package/dist/tests/e2e/gui-webgl.test.js +4 -4
- package/dist/tests/e2e/gui-webgl.test.js.map +1 -1
- package/dist/tests/e2e/gui-webgl2-shadow-sampler.test.d.ts +8 -0
- package/dist/tests/e2e/gui-webgl2-shadow-sampler.test.js +336 -0
- package/dist/tests/e2e/gui-webgl2-shadow-sampler.test.js.map +1 -0
- package/dist/tests/e2e/gui-webgl2-shadow.test.d.ts +10 -0
- package/dist/tests/e2e/gui-webgl2-shadow.test.js +108 -0
- package/dist/tests/e2e/gui-webgl2-shadow.test.js.map +1 -0
- package/dist/tests/e2e/url.test.d.ts +6 -0
- package/dist/tests/e2e/url.test.js +114 -0
- package/dist/tests/e2e/url.test.js.map +1 -0
- package/dist/tests/extensions/gui.test.js +45 -10
- package/dist/tests/extensions/gui.test.js.map +1 -1
- package/doc/gui/api.md +28 -2
- package/doc/gui/canvas.md +110 -27
- package/doc/gui/known-issues.md +32 -10
- package/doc/gui/rendering.md +77 -0
- package/doc/gui/runtime.md +18 -3
- package/doc/gui/webgl.md +58 -29
- package/doc/gui-scripts.md +19 -19
- package/doc/gui.md +43 -9
- package/doc/implemented/fetch.md +5 -0
- package/doc/implemented/modules.md +13 -0
- package/doc/implemented/stdlib.md +17 -0
- package/doc/unimplemented/deviations.md +1 -0
- package/doc/zh-CN/gui/api.md +25 -2
- package/doc/zh-CN/gui/canvas.md +95 -26
- package/doc/zh-CN/gui/known-issues.md +21 -4
- package/doc/zh-CN/gui/rendering.md +59 -0
- package/doc/zh-CN/gui/runtime.md +13 -3
- package/doc/zh-CN/gui/webgl.md +30 -8
- package/doc/zh-CN/gui-scripts.md +14 -13
- package/doc/zh-CN/gui.md +32 -8
- package/doc/zh-CN/implemented/fetch.md +4 -0
- package/doc/zh-CN/implemented/modules.md +10 -0
- package/doc/zh-CN/implemented/stdlib.md +15 -0
- package/doc/zh-CN/unimplemented/deviations.md +1 -0
- package/package.json +7 -7
- package/runtime/ext_gui/browser.cpp +3 -1
- package/runtime/ext_gui/canvas.cpp +135 -89
- package/runtime/ext_gui/canvas.h +116 -0
- package/runtime/ext_gui/canvas_clip.cpp +143 -0
- package/runtime/ext_gui/canvas_composite.cpp +241 -0
- package/runtime/ext_gui/canvas_coverage.cpp +241 -0
- package/runtime/ext_gui/canvas_gradient.cpp +41 -4
- package/runtime/ext_gui/canvas_image_data.cpp +4 -0
- package/runtime/ext_gui/canvas_internal.h +34 -9
- package/runtime/ext_gui/canvas_raster.cpp +207 -178
- package/runtime/ext_gui/canvas_shadow.cpp +161 -0
- package/runtime/ext_gui/canvas_stroke.cpp +37 -9
- package/runtime/ext_gui/canvas_style.cpp +59 -0
- package/runtime/ext_gui/canvas_text.cpp +140 -0
- package/runtime/ext_gui/css.h +7 -0
- package/runtime/ext_gui/css_sheet.cpp +22 -0
- package/runtime/ext_gui/document.cpp +25 -1
- package/runtime/ext_gui/document.h +8 -0
- package/runtime/ext_gui/dom_api_canvas.cpp +16 -1
- package/runtime/ext_gui/dom_api_canvas_image.cpp +9 -0
- package/runtime/ext_gui/dom_api_canvas_state.cpp +217 -0
- package/runtime/ext_gui/dom_api_internal.h +36 -37
- package/runtime/ext_gui/dom_api_offscreen.cpp +213 -0
- package/runtime/ext_gui/dom_api_proto.cpp +18 -0
- package/runtime/ext_gui/dom_api_webgl.cpp +29 -9
- package/runtime/ext_gui/dom_api_webgl2.cpp +33 -1
- package/runtime/ext_gui/dom_api_webgl_internal.h +58 -0
- package/runtime/ext_gui/dom_api_webgl_source.cpp +18 -0
- package/runtime/ext_gui/gradient_values.cpp +12 -1
- package/runtime/ext_gui/gui.cpp +5 -0
- package/runtime/ext_gui/gui_canvas.cpp +4 -0
- package/runtime/ext_gui/gui_engine.h +32 -0
- package/runtime/ext_gui/gui_events.cpp +182 -58
- package/runtime/ext_gui/gui_media.cpp +3 -0
- package/runtime/ext_gui/image.cpp +69 -0
- package/runtime/ext_gui/image_bitmap_browser.cpp +11 -0
- package/runtime/ext_gui/layout.cpp +4 -0
- package/runtime/ext_gui/paint.cpp +19 -0
- package/runtime/ext_gui/paint_background.cpp +18 -1
- package/runtime/ext_gui/perf.cpp +171 -0
- package/runtime/ext_gui/perf.h +127 -0
- package/runtime/ext_gui/renderer.cpp +109 -41
- package/runtime/ext_gui/renderer.h +33 -9
- package/runtime/ext_gui/renderer_image.cpp +135 -65
- package/runtime/ext_gui/renderer_internal.h +15 -3
- package/runtime/ext_gui/renderer_text.cpp +24 -12
- package/runtime/ext_gui/script.cpp +31 -0
- package/runtime/ext_gui/style.cpp +101 -30
- package/runtime/ext_gui/style.h +6 -3
- package/runtime/ext_gui/style_print.cpp +7 -1
- package/runtime/ext_gui/text.cpp +23 -4
- package/runtime/ext_gui/text.h +29 -0
- package/runtime/ext_gui/text_cache.cpp +118 -0
- package/runtime/ext_gui/text_glyph_cache.cpp +100 -0
- package/runtime/ext_gui/webgl.h +48 -146
- package/runtime/ext_gui/webgl_blit.cpp +12 -1
- package/runtime/ext_gui/webgl_blit_depth.cpp +270 -0
- package/runtime/ext_gui/webgl_buffer.cpp +59 -1
- package/runtime/ext_gui/webgl_buffer_objects.cpp +106 -9
- package/runtime/ext_gui/webgl_clear.cpp +3 -0
- package/runtime/ext_gui/webgl_context.cpp +29 -3
- package/runtime/ext_gui/webgl_draw.cpp +75 -270
- package/runtime/ext_gui/webgl_draw_buffers.cpp +1 -0
- package/runtime/ext_gui/webgl_draw_setup.cpp +321 -0
- package/runtime/ext_gui/webgl_draw_state.h +130 -0
- package/runtime/ext_gui/webgl_glsl.h +3 -0
- package/runtime/ext_gui/webgl_glsl_scan.cpp +3 -8
- package/runtime/ext_gui/webgl_glsl_unroll.cpp +283 -0
- package/runtime/ext_gui/webgl_msl.cpp +4 -0
- package/runtime/ext_gui/webgl_objects.h +148 -0
- package/runtime/ext_gui/webgl_pipeline.cpp +8 -8
- package/runtime/ext_gui/webgl_program_internal.h +35 -0
- package/runtime/ext_gui/webgl_shader.cpp +34 -36
- package/runtime/ext_gui/webgl_webgl2.cpp +36 -0
- package/runtime/ext_gui/window.cpp +56 -1
- package/runtime/rt.h +3 -0
- package/runtime/xt_fetch/async.inc +60 -0
- package/runtime/xt_url_object.c +463 -0
- package/src/codegen/generator/module.ts +22 -7
- package/src/codegen/generator/state.ts +1 -0
- package/src/codegen/generator/tables.ts +1 -0
- package/src/driver/bundler/deferred.ts +351 -0
- package/src/driver/bundler/merge.ts +219 -2
- package/src/driver/runtime-objects.ts +1 -0
- package/src/driver/version.ts +1 -1
- package/src/extensions/gui/html.ts +100 -17
- package/src/extensions/gui/index.ts +1 -0
- package/src/extensions/gui/three.ts +4 -3
|
@@ -81,18 +81,44 @@ describe("gui .html asset loader", () => {
|
|
|
81
81
|
expect(htmlOf(moduleSource)).toContain(`<script data-xt-id="${id}"></script>`);
|
|
82
82
|
expect(parseDiagnostics(moduleSource)).toBe(0);
|
|
83
83
|
});
|
|
84
|
-
it("
|
|
84
|
+
it("defers a relative import and rewrites it from the HTML dir", () => {
|
|
85
85
|
const directory = writeFiles({
|
|
86
86
|
"scripts/app.ts": 'import { size } from "../lib/util";\nconsole.log(size);',
|
|
87
87
|
"lib/util.ts": "export const size = 1;",
|
|
88
88
|
});
|
|
89
89
|
const htmlPath = join(directory, "page.html");
|
|
90
90
|
const { moduleSource } = loadHtmlAsset(htmlPath, `<script src="./scripts/app.ts"></script>`);
|
|
91
|
-
|
|
91
|
+
/* The loader marks the module, and the generated script loads it at run
|
|
92
|
+
* time instead of hoisting an eager import. */
|
|
93
|
+
expect(moduleSource).toContain('import { __xt_deferred_module as __xt_deferred_0_0 } from "./lib/util"');
|
|
94
|
+
expect(moduleSource).toContain("const { size } = __xt_deferred_0_0();");
|
|
92
95
|
expect(moduleSource).toContain("console.log(size);");
|
|
93
96
|
expect(moduleSource).not.toContain("../lib/util");
|
|
94
97
|
expect(parseDiagnostics(moduleSource)).toBe(0);
|
|
95
98
|
});
|
|
99
|
+
it("keeps a CRLF external script intact when hoisting its imports", () => {
|
|
100
|
+
/* The parser indexes newline-normalized text, so masking the raw file would
|
|
101
|
+
* blank the wrong spans and leave fragments like "js';" in the body. */
|
|
102
|
+
const directory = writeFiles({
|
|
103
|
+
"app.ts": "import { size } from './util';\r\n\r\nconst label = 'ready';\r\nconsole.log(size, label);\r\n",
|
|
104
|
+
"util.ts": "export const size = 1;",
|
|
105
|
+
});
|
|
106
|
+
const htmlPath = join(directory, "page.html");
|
|
107
|
+
const { moduleSource, sourceRanges } = loadHtmlAsset(htmlPath, `<html>\r\n<body>\r\n<script src="./app.ts"></script>\r\n</body>\r\n</html>`);
|
|
108
|
+
expect(moduleSource).toContain("console.log(size, label);");
|
|
109
|
+
expect(moduleSource).toContain("const label = 'ready';");
|
|
110
|
+
expect(moduleSource.match(/js';/g)).toBeNull();
|
|
111
|
+
const html = htmlOf(moduleSource);
|
|
112
|
+
expect(html).not.toContain("\r");
|
|
113
|
+
expect(html).toContain("<body>");
|
|
114
|
+
expect(sourceRanges).toHaveLength(1);
|
|
115
|
+
const range = sourceRanges[0];
|
|
116
|
+
const body = moduleSource.slice(range.start, range.end);
|
|
117
|
+
expect(body).toContain("const label = 'ready';");
|
|
118
|
+
expect(body).toContain("console.log(size, label);");
|
|
119
|
+
expect(body).not.toContain("import {");
|
|
120
|
+
expect(parseDiagnostics(moduleSource)).toBe(0);
|
|
121
|
+
});
|
|
96
122
|
it("strips export modifiers from an external script", () => {
|
|
97
123
|
const directory = writeFiles({
|
|
98
124
|
"app.ts": "export const a = 1;\nexport function f() { return a; }",
|
|
@@ -107,7 +133,9 @@ describe("gui .html asset loader", () => {
|
|
|
107
133
|
const directory = writeFiles({ "page.html": "" });
|
|
108
134
|
expect(() => loadHtmlAsset(join(directory, "page.html"), `<script src="./missing.ts"></script>`)).toThrow(/not found/);
|
|
109
135
|
});
|
|
110
|
-
it("
|
|
136
|
+
it("keeps deferred bindings local to each external script", () => {
|
|
137
|
+
/* Two scripts may import the same name: each prelude destructures into its
|
|
138
|
+
* own script function, so there is no module-scope collision. */
|
|
111
139
|
const directory = writeFiles({
|
|
112
140
|
"a.ts": 'import { x } from "./x";\nconsole.log(x);',
|
|
113
141
|
"b.ts": 'import { x } from "./y";\nconsole.log(x);',
|
|
@@ -115,7 +143,10 @@ describe("gui .html asset loader", () => {
|
|
|
115
143
|
"y.ts": "export const x = 2;",
|
|
116
144
|
});
|
|
117
145
|
const htmlPath = join(directory, "page.html");
|
|
118
|
-
|
|
146
|
+
const { moduleSource } = loadHtmlAsset(htmlPath, `<script src="./a.ts"></script><script src="./b.ts"></script>`);
|
|
147
|
+
expect(moduleSource).toContain("__xt_deferred_0_0");
|
|
148
|
+
expect(moduleSource).toContain("__xt_deferred_1_0");
|
|
149
|
+
expect(parseDiagnostics(moduleSource)).toBe(0);
|
|
119
150
|
});
|
|
120
151
|
it("emits only the HTML string when there are no scripts", () => {
|
|
121
152
|
const { moduleSource } = loadHtmlAsset("page.html", "<h1>hi</h1>");
|
|
@@ -129,7 +160,7 @@ describe("gui .html asset loader", () => {
|
|
|
129
160
|
expect(moduleSource.indexOf(hashString(first))).toBeLessThan(moduleSource.indexOf(hashString(second)));
|
|
130
161
|
expect(parseDiagnostics(moduleSource)).toBe(0);
|
|
131
162
|
});
|
|
132
|
-
it("
|
|
163
|
+
it("defers namespace, side-effect and re-export statements", () => {
|
|
133
164
|
const directory = writeFiles({
|
|
134
165
|
"app.ts": [
|
|
135
166
|
'import * as util from "./util";',
|
|
@@ -146,11 +177,15 @@ describe("gui .html asset loader", () => {
|
|
|
146
177
|
});
|
|
147
178
|
const htmlPath = join(directory, "page.html");
|
|
148
179
|
const { moduleSource } = loadHtmlAsset(htmlPath, `<script src="./app.ts"></script>`);
|
|
149
|
-
expect(moduleSource).toContain('
|
|
150
|
-
expect(moduleSource).toContain('
|
|
151
|
-
expect(moduleSource).toContain('
|
|
152
|
-
expect(moduleSource).toContain(
|
|
153
|
-
expect(moduleSource).toContain(
|
|
180
|
+
expect(moduleSource).toContain('from "./util"');
|
|
181
|
+
expect(moduleSource).toContain('from "./side-effect"');
|
|
182
|
+
expect(moduleSource).toContain('from "./mixed"');
|
|
183
|
+
expect(moduleSource).toContain("const util = __xt_deferred_0_0();");
|
|
184
|
+
expect(moduleSource).toContain("__xt_deferred_0_1();");
|
|
185
|
+
expect(moduleSource).toContain("const defaultExport = __xt_deferred_0_2().default;");
|
|
186
|
+
expect(moduleSource).toContain("const { named } = __xt_deferred_0_2();");
|
|
187
|
+
expect(moduleSource).toContain("__xt_deferred_0_3();");
|
|
188
|
+
expect(moduleSource).toContain("__xt_deferred_0_4();");
|
|
154
189
|
/* The local `export { a }` and `export default` are blanked out. */
|
|
155
190
|
expect(moduleSource).not.toContain("export default 42");
|
|
156
191
|
expect(moduleSource).not.toContain("export default function");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gui.test.js","sourceRoot":"","sources":["../../../tests/extensions/gui.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OA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
|
package/doc/gui/api.md
CHANGED
|
@@ -94,8 +94,9 @@ requestAnimationFrame(frame);
|
|
|
94
94
|
| `Event`, `CustomEvent`, `ProgressEvent`, `MouseEvent`, `KeyboardEvent`, `PointerEvent`, `WheelEvent`, `FocusEvent`, `InputEvent`, `SubmitEvent` | event constructors; the `init` argument is kept as given (`detail`, `composed`, mouse/keyboard fields, …) |
|
|
95
95
|
| `AbortController`, `AbortSignal` | a real controller/signal pair for `{ signal }` listener removal, with `abort()`, `aborted`, `reason`, `onabort` and `throwIfAborted()` |
|
|
96
96
|
| `HTMLCanvasElement`, `HTMLImageElement`, `WebGLRenderingContext`, `WebGL2RenderingContext`, `WebGLBuffer`/`WebGLTexture`/`WebGLShader`/`WebGLProgram`/`WebGLFramebuffer`/`WebGLRenderbuffer`/`WebGLUniformLocation`/`WebGLActiveInfo`/`WebGLVertexArrayObject`/`WebGLSampler`/`WebGLQuery`/`WebGLSync`/`WebGLTransformFeedback` | real constructor values. `canvas.getContext("webgl")` and `getContext("webgl2")` return GPU contexts (see [WebGL](./webgl.md)). |
|
|
97
|
-
| `ImageBitmap`, `createImageBitmap(source)` | immutable bitmaps backed by decoded pixels (`<img>`, `<canvas>`, `<video>` frames and `ImageData` shapes); the promise resolves immediately and `texImage2D` accepts the result |
|
|
98
|
-
| `
|
|
97
|
+
| `ImageBitmap`, `createImageBitmap(source)` | immutable bitmaps backed by decoded pixels (`<img>`, `<canvas>`, `<video>` frames, `OffscreenCanvas` and `ImageData` shapes); the promise resolves immediately and `texImage2D` accepts the result |
|
|
98
|
+
| `OffscreenCanvas` | a real 2D offscreen bitmap with `getContext("2d")`, `width`/`height`, `transferToImageBitmap()` and `convertToBlob()`; `canvas.transferControlToOffscreen()` hands an element's bitmap over (see [Canvas](./canvas.md)). There is no offscreen WebGL context. |
|
|
99
|
+
| `ImageData`, `XRWebGL*`, `Request`, `Headers`, `Response`, `ReadableStream`, `DOMParser` | `typeof` probes answer `"undefined"` (no XR/fetch/streaming backend), which lets a page take its "unsupported" branch instead of calling a no-op stub. Three.js pages use its real renderer on this backend (see [Known issues](./known-issues.md)). |
|
|
99
100
|
| `requestAnimationFrame` / `cancelAnimationFrame` | queued on the window's frame list; see [Runtime integration](./runtime.md) |
|
|
100
101
|
| `alert` / `confirm` / `prompt`, `matchMedia`, `getComputedStyle`, `escape` | host implementations. `matchMedia` returns a **live** list (cached per query): `matches` is re-evaluated on resize and `change` listeners fire when it flips. `confirm`/`prompt` use a native dialog only with `XT_GUI_DIALOGS=1`; otherwise they report the message on stderr and return the documented default (Annex B `escape` encodes per UTF-16 code unit, matching `decodeURIComponent(escape(bytes))`) |
|
|
101
102
|
|
|
@@ -211,6 +212,31 @@ steady state every one of them is constant — a climbing `detachedNodes` or
|
|
|
211
212
|
`handles` means the program removes nodes faster than it releases them (see
|
|
212
213
|
[Node lifetime](./dom.md#node-lifetime)).
|
|
213
214
|
|
|
215
|
+
The same object reports what the last completed frame did and how much work the
|
|
216
|
+
program has done in total, which is how rendering cost is measured (see
|
|
217
|
+
[Performance](./rendering.md#performance-m20)):
|
|
218
|
+
|
|
219
|
+
| Field | Meaning |
|
|
220
|
+
| --- | --- |
|
|
221
|
+
| `frameMs`, `restyleMs`, `layoutMs`, `paintMs`, `uploadMs`, `drawMs` | phase timings of the last frame (milliseconds) |
|
|
222
|
+
| `frames`, `presents`, `exposes`, `deferred`, `skippedFrames`, `starvedFrames`, `transitionFrames` | frame loop activity: `presents` counts swapchain frames, `exposes` the presents the window system asked for with an expose/shown/restore event, `deferred` the presents a starved frame postponed, `skippedFrames` the frames nothing needed and `starvedFrames` the frames that asked to present and got no drawable target |
|
|
223
|
+
| `restyles`, `restyleNodes`, `rulesEvaluated`, `mediaEvaluated`, `layouts`, `layoutBoxes` | cascade and layout work |
|
|
224
|
+
| `textShapeCalls`, `textShapeHits`, `textCacheBytes`, `textCacheEntries` | shaping cache misses/hits and its occupancy |
|
|
225
|
+
| `paints`, `paintOps`, `drawRuns`, `drawCalls`, `uploadSubmits`, `vertices`, `syncNodes` | display-list, draw-call and upload work |
|
|
226
|
+
| `canvasDraws`, `canvasUploads`, `canvasUploadBytes` | Canvas 2D draw calls, texture uploads and the bytes copied (a partial redraw uploads only its dirty rectangle) |
|
|
227
|
+
| `webglDraws`, `webglPasses`, `webglPipelineMisses`, `webglBufferUploadBytes` | WebGL draw calls, render passes opened, pipelines created and buffer bytes copied |
|
|
228
|
+
|
|
229
|
+
Every field except the `*Ms` timings is cumulative, so subtract two snapshots to
|
|
230
|
+
get one frame. `restyleMs` covers the cascade **and** the layout pass it
|
|
231
|
+
triggers (which is also reported on its own as `layoutMs`).
|
|
232
|
+
`presents - exposes - deferred` counts the presents only the page asked for: an
|
|
233
|
+
expose/shown/restore event means the window has no contents and must be redrawn,
|
|
234
|
+
at a time the window server chooses, and a deferred present replays work an
|
|
235
|
+
earlier frame built when no swapchain image was available (`starvedFrames` counts
|
|
236
|
+
those frames — a climbing value means the window is not being updated at all).
|
|
237
|
+
`XT_GUI_PERF=1` prints the same numbers on stderr (one line per frame;
|
|
238
|
+
`XT_GUI_PERF=<N>` averages over N frames).
|
|
239
|
+
|
|
214
240
|
They are used by `tests/e2e/gui-*.test.ts` to assert parsing, selector matching,
|
|
215
241
|
specificity, inheritance, `!important` and layout geometry. They will stay useful
|
|
216
242
|
afterwards for debugging.
|
package/doc/gui/canvas.md
CHANGED
|
@@ -36,6 +36,16 @@ a shared prototype. The handle is cached on the element, so every call returns
|
|
|
36
36
|
the **same** object and the drawing state (transform, styles, path) is per
|
|
37
37
|
canvas, not per call. `ctx.canvas` is the owning element handle.
|
|
38
38
|
|
|
39
|
+
`OffscreenCanvas` has the same 2D surface without a DOM element:
|
|
40
|
+
`new OffscreenCanvas(width, height)` allocates a bitmap owned by the window,
|
|
41
|
+
`getContext("2d")` returns a context whose `canvas` is the offscreen object, and
|
|
42
|
+
`canvas.transferControlToOffscreen()` hands a live element's bitmap to one
|
|
43
|
+
(`element.getContext(…)` then answers `null`). `drawImage`, `createPattern`,
|
|
44
|
+
`createImageBitmap` and `texImage2D` accept an `OffscreenCanvas` as a source.
|
|
45
|
+
`transferToImageBitmap()` returns an `ImageBitmap` and `convertToBlob()`
|
|
46
|
+
resolves to the same PNG blob shape as `toBlob` (there is no worker or
|
|
47
|
+
`OffscreenCanvas` WebGL context in this runtime).
|
|
48
|
+
|
|
39
49
|
`getContext("2d", attributes)` honours `alpha` on the first call: with
|
|
40
50
|
`{ alpha: false }` the bitmap starts (and clears) opaque black. The other
|
|
41
51
|
attributes are reported by `getContextAttributes()` at their specification
|
|
@@ -51,7 +61,36 @@ horizontal coverage** pass, and fills paths with the **non-zero winding rule**
|
|
|
51
61
|
(so `arc`-shaped holes work when wound the other way) unless
|
|
52
62
|
`fill("evenodd")` selects the even-odd rule. An axis-aligned rectangle
|
|
53
63
|
(`b == 0 && c == 0` in the transform) takes a direct coverage fast path.
|
|
54
|
-
Blending
|
|
64
|
+
Blending uses non-premultiplied source-over by default. `globalCompositeOperation`
|
|
65
|
+
selects the full canvas set: the Porter-Duff operators (`source-over`,
|
|
66
|
+
`source-in`, `source-out`, `source-atop`, `destination-over`,
|
|
67
|
+
`destination-in`, `destination-out`, `destination-atop`, `lighter`, `copy`,
|
|
68
|
+
`xor`) and the separable/non-separable blend modes (`multiply`, `screen`,
|
|
69
|
+
`overlay`, `darken`, `lighten`, `color-dodge`, `color-burn`, `hard-light`,
|
|
70
|
+
`soft-light`, `difference`, `exclusion`, `hue`, `saturation`, `color`,
|
|
71
|
+
`luminosity`). Coverage from anti-aliasing and the clip region interpolates
|
|
72
|
+
between the untouched destination and the composited result, so a partially
|
|
73
|
+
covered pixel is correct for every operator.
|
|
74
|
+
|
|
75
|
+
`clip()` intersects the current clip region with the current path (or a
|
|
76
|
+
`Path2D` and an optional `"nonzero"`/`"evenodd"` rule). The region is stored as
|
|
77
|
+
a device-space coverage mask, so it follows the transform in effect when
|
|
78
|
+
`clip()` was called; `save`/`restore` restore it and resizing the bitmap clears
|
|
79
|
+
it. Every fill, stroke, text run, image draw and `clearRect` honours the mask.
|
|
80
|
+
|
|
81
|
+
Shadows (`shadowColor`, `shadowBlur`, `shadowOffsetX`, `shadowOffsetY`) are
|
|
82
|
+
painted from the operation's own alpha: the draw is first rendered into a
|
|
83
|
+
scratch layer, its alpha is offset and box-blurred (three separable passes),
|
|
84
|
+
tinted with `shadowColor`, composited, and the unfiltered layer is drawn over
|
|
85
|
+
it. The offset and blur are in canvas (device) units and are not affected by
|
|
86
|
+
the transform, as the API specifies. `clearRect` and `putImageData` never cast
|
|
87
|
+
a shadow.
|
|
88
|
+
|
|
89
|
+
`isPointInPath(x, y[, fillRule])`, `isPointInPath(path, x, y[, fillRule])`,
|
|
90
|
+
`isPointInStroke(x, y)` and `isPointInStroke(path, x, y)` hit-test the current
|
|
91
|
+
path (or the supplied `Path2D`) under the current transform; stroke hit testing
|
|
92
|
+
uses the device-space distance to each flattened segment and the current line
|
|
93
|
+
width.
|
|
55
94
|
|
|
56
95
|
A fill or stroke paints with a solid colour **or a `CanvasGradient`**. Gradient
|
|
57
96
|
coordinates are user-space coordinates, so the rasteriser maps each device pixel
|
|
@@ -67,6 +106,33 @@ decode table). It is released when the node is dropped (`loadHTML`, window
|
|
|
67
106
|
close/quit, or a mutation that discards the subtree), which also releases the
|
|
68
107
|
matching GPU texture.
|
|
69
108
|
|
|
109
|
+
## Performance
|
|
110
|
+
|
|
111
|
+
A canvas is redrawn by the script, not by the engine, so its cost is per drawing
|
|
112
|
+
call. With many elements the hot paths are deliberately branch-light:
|
|
113
|
+
|
|
114
|
+
- a solid, opaque `fillRect` is a byte store into the bitmap (fractional edges
|
|
115
|
+
still take the anti-aliased path), and `clearRect` over the whole bitmap is a
|
|
116
|
+
single `memset`;
|
|
117
|
+
- path coverage is rasterised with a per-row **active-edge list**, and only the
|
|
118
|
+
**covered span of each row** is materialised — a thin diagonal stroke costs
|
|
119
|
+
its own pixels, not its bounding box;
|
|
120
|
+
- one `stroke()` batches all of its segment quads, joins and caps into a single
|
|
121
|
+
non-zero fill instead of one coverage pass per piece (each piece's winding is
|
|
122
|
+
normalised first, so overlapping pieces cover rather than cancel);
|
|
123
|
+
- `fillText` shares the shaped-run cache with layout (`text_cache.cpp`) and uses
|
|
124
|
+
a bounded two-generation glyph bitmap cache (`text_glyph_cache.cpp`);
|
|
125
|
+
- `drawImage` at integer offsets with no scaling copies one texel per pixel
|
|
126
|
+
instead of running the bilinear sampler.
|
|
127
|
+
|
|
128
|
+
The bitmap reaches the screen through a **dirty rectangle**: every draw unions
|
|
129
|
+
its device-space bounds, and the renderer copies only that region into the
|
|
130
|
+
canvas texture. All of a frame's canvas and video uploads share the frame's one
|
|
131
|
+
upload command buffer, so K animated canvases cost one submit rather than K.
|
|
132
|
+
`getImageData` always reads the CPU bitmap, so it is unaffected.
|
|
133
|
+
`tests/e2e/gui-draw-perf.test.ts` measures the multi-element paths and pins the
|
|
134
|
+
counter behaviour (one upload per frame, only the dirty bytes).
|
|
135
|
+
|
|
70
136
|
## Supported API
|
|
71
137
|
|
|
72
138
|
State and transforms: `save` / `restore` (which restore the transform, line
|
|
@@ -79,34 +145,43 @@ canvas order: `translate(x, y); rotate(a)` rotates around the translated origin.
|
|
|
79
145
|
|
|
80
146
|
Styles and settings: `fillStyle` / `strokeStyle` (CSS colors understood by the
|
|
81
147
|
cascade's color parser, or a `CanvasGradient`), `lineWidth`, `globalAlpha`,
|
|
148
|
+
`globalCompositeOperation`, `shadowColor` / `shadowBlur` / `shadowOffsetX` /
|
|
149
|
+
`shadowOffsetY`, `imageSmoothingEnabled` / `imageSmoothingQuality`,
|
|
82
150
|
`lineCap` (`butt`/`round`/`square`), `lineJoin` (`miter`/`round`/`bevel`),
|
|
83
151
|
`miterLimit`, `lineDashOffset`, `font` (a CSS font shorthand resolving to
|
|
84
152
|
family, size and bold/italic — default `10px sans-serif`), `textAlign`
|
|
85
153
|
(`start`/`left`, `center`, `right`/`end`) and `textBaseline` (`alphabetic`,
|
|
86
154
|
`top`, `middle`, `bottom`, `hanging`, `ideographic`). Reading a property returns
|
|
87
155
|
the value last assigned; assigning an unparseable color keeps the previous one.
|
|
156
|
+
`imageSmoothingEnabled` defaults to `true` (bilinear sampling);
|
|
157
|
+
`imageSmoothingQuality` reports `low`, `medium` or `high` and selects the same
|
|
158
|
+
bilinear filter in this backend.
|
|
88
159
|
|
|
89
160
|
Gradients: `createLinearGradient(x0, y0, x1, y1)` and
|
|
90
161
|
`createRadialGradient(x0, y0, r0, x1, y1, r1)` return a `CanvasGradient` with
|
|
91
162
|
`addColorStop(offset, color)`. Stops stay live, so a stop added after
|
|
92
163
|
`fillStyle = gradient` affects later fills, and the `fillStyle`/`strokeStyle`
|
|
93
|
-
getter returns the same gradient handle.
|
|
94
|
-
|
|
95
|
-
|
|
164
|
+
getter returns the same gradient handle. A radial gradient is the general
|
|
165
|
+
two-circle cone: the colour at a point is resolved from the interpolated circle
|
|
166
|
+
(`centre = c0 + t·(c1 − c0)`, `radius = r0 + t·(r1 − r0)`), so an offset inner
|
|
167
|
+
circle and different radii behave like a browser's. A point inside the inner
|
|
168
|
+
circle samples stop 0.
|
|
96
169
|
|
|
97
170
|
Paths: `beginPath`, `closePath`, `moveTo`, `lineTo`, `rect`, `roundRect`,
|
|
98
171
|
`arc`, `ellipse`, `quadraticCurveTo`, `bezierCurveTo`, then
|
|
99
172
|
`fill(fillRule?)` / `fill(path, fillRule?)` (multi-loop; `"nonzero"` or
|
|
100
|
-
`"evenodd"`)
|
|
101
|
-
|
|
102
|
-
|
|
173
|
+
`"evenodd"`), `stroke(path?)`, `clip(path?, fillRule?)` and the
|
|
174
|
+
`isPointInPath`/`isPointInStroke` hit tests. Bezier and quadratic segments are
|
|
175
|
+
flattened into line segments; arcs and ellipses are flattened too. `roundRect`
|
|
176
|
+
accepts a single radius number or the CSS radius list (`[all]`, `[tl, br]`,
|
|
103
177
|
`[tl, tr, br]`, `[tl, tr, br, bl]`, numbers or `{ x, y }` pairs; corners are
|
|
104
178
|
drawn circular).
|
|
105
179
|
|
|
106
180
|
`Path2D` is implemented with the same path commands (`moveTo`, `lineTo`,
|
|
107
181
|
`closePath`, `rect`, `roundRect`, `arc`, `ellipse`, `quadraticCurveTo`,
|
|
108
|
-
`bezierCurveTo`, `addPath`) and can be passed to `fill`/`stroke
|
|
109
|
-
be built once and replayed under different
|
|
182
|
+
`bezierCurveTo`, `addPath`) and can be passed to `fill`/`stroke`/`clip` and the
|
|
183
|
+
`isPointIn*` hit tests, so a path can be built once and replayed under different
|
|
184
|
+
transforms.
|
|
110
185
|
|
|
111
186
|
Rectangles: `clearRect`, `fillRect`, `strokeRect`.
|
|
112
187
|
|
|
@@ -129,35 +204,43 @@ Images: `drawImage(source, …)` in the 3-argument (`dx, dy`), 5-argument
|
|
|
129
204
|
(`dx, dy, dw, dh`) and 9-argument (`dx, dy, dw, dh, sx, sy, sw, sh`; this
|
|
130
205
|
engine's 9-argument form is destination-first) forms. A full affine transform
|
|
131
206
|
(rotation/skew/scale) is honoured: the destination rectangle becomes a
|
|
132
|
-
parallelogram and every device pixel is inverse-mapped to the source rectangle
|
|
133
|
-
|
|
134
|
-
`<canvas
|
|
135
|
-
|
|
136
|
-
|
|
207
|
+
parallelogram and every device pixel is inverse-mapped to the source rectangle.
|
|
208
|
+
`source` may be an `<img>` element (decoded through the image module), another
|
|
209
|
+
`<canvas>`, an `OffscreenCanvas`, or an `ImageBitmap`. Sampling is bilinear when
|
|
210
|
+
`imageSmoothingEnabled` is `true` (the default) and nearest-neighbour when it is
|
|
211
|
+
`false`.
|
|
137
212
|
|
|
138
213
|
Test hook: `getImageData(x, y, w, h)` copies a region to
|
|
139
214
|
`{ width, height, data }` where `data` is a row-major RGBA8 byte array.
|
|
140
215
|
Out-of-bounds pixels are transparent.
|
|
141
216
|
|
|
142
|
-
Patterns: `createPattern(source, repetition?)` accepts an `<img
|
|
143
|
-
`<canvas
|
|
144
|
-
`no-repeat`), so the tiles follow the
|
|
145
|
-
`fillStyle`/`strokeStyle`; assigning a
|
|
217
|
+
Patterns: `createPattern(source, repetition?)` accepts an `<img>`,
|
|
218
|
+
`<canvas>`, `OffscreenCanvas` or `ImageBitmap` and tiles it in user space
|
|
219
|
+
(`repeat`, `repeat-x`, `repeat-y`, `no-repeat`), so the tiles follow the
|
|
220
|
+
current transform. Assign the result to `fillStyle`/`strokeStyle`; assigning a
|
|
221
|
+
colour replaces it.
|
|
146
222
|
|
|
147
223
|
Image data and export: `createImageData(width, height)` allocates a blank
|
|
148
224
|
`{ width, height, data }`, and `putImageData(imageData, dx, dy[, dirtyX, dirtyY,
|
|
149
225
|
dirtyWidth, dirtyHeight])` copies bytes straight into the bitmap (no transform,
|
|
150
|
-
blending or `globalAlpha`). `canvas.toDataURL(type?)` exports a PNG data
|
|
151
|
-
`canvas.toBlob(callback, type?)` delivers a Blob-shaped `{ type, size }`
|
|
152
|
-
microtask (the bytes are on `__xt_gui_blob_data`; there is no
|
|
153
|
-
`URL.createObjectURL`).
|
|
226
|
+
blending, clip or `globalAlpha`). `canvas.toDataURL(type?)` exports a PNG data
|
|
227
|
+
URL and `canvas.toBlob(callback, type?)` delivers a Blob-shaped `{ type, size }`
|
|
228
|
+
from a microtask (the bytes are on `__xt_gui_blob_data`; there is no
|
|
229
|
+
`URL.createObjectURL`). `OffscreenCanvas.convertToBlob()` resolves to the same
|
|
230
|
+
shape and `transferToImageBitmap()` snapshots the bitmap.
|
|
231
|
+
|
|
232
|
+
CSS backgrounds: `background-image: url(...)` accepts a file path or a `data:`
|
|
233
|
+
URL, so a canvas can be used as a CSS background by exporting it first
|
|
234
|
+
(`element.style.backgroundImage = "url(" + canvas.toDataURL() + ")"`). An image
|
|
235
|
+
layer is stretched to the element's border box; `background-size`,
|
|
236
|
+
`background-position` and tiling are not modelled.
|
|
154
237
|
|
|
155
238
|
## Not implemented
|
|
156
239
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
240
|
+
Smoothing quality has one filter (bilinear) on this backend. Offscreen canvases
|
|
241
|
+
support the 2D context only (a WebGL context needs a DOM element for its
|
|
242
|
+
texture table). Text under a rotated or skewed transform places glyphs on the
|
|
243
|
+
transformed baseline but does not rotate the glyph bitmaps, and `strokeText`
|
|
244
|
+
fills with the stroke style rather than outlining.
|
|
162
245
|
See also [Media](./media.md) for the image/video/audio decode stack that
|
|
163
246
|
`drawImage` and the texture upload share.
|
package/doc/gui/known-issues.md
CHANGED
|
@@ -11,16 +11,17 @@
|
|
|
11
11
|
glslang — consumed directly by the Vulkan backend, or cross-compiled to MSL by
|
|
12
12
|
the bundled SPIRV-Cross for Metal — and the drawing buffer is an offscreen
|
|
13
13
|
colour texture that the page composites without a readback. WebGL 2 adds VAOs,
|
|
14
|
-
instancing, integer attributes, sampler objects, `texStorage2D
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
instancing, integer attributes, sampler objects, `texStorage2D`, buffer copies,
|
|
15
|
+
uniform blocks, cube/3D/array textures, float/depth/compressed textures,
|
|
16
|
+
multiple render targets and scissored clears. `blitFramebuffer` copies colour
|
|
17
|
+
and depth; transform feedback, MSAA and stencil blits are not implemented
|
|
18
|
+
(SDL_GPU has no transform-feedback stage, its Metal multisample resolve is
|
|
19
|
+
unreliable, and a stencil attachment is not sampleable). On an SDL_GPU backend
|
|
20
|
+
that accepts neither SPIR-V nor MSL (Direct3D 12, which would need DXIL) both
|
|
21
|
+
context kinds are `null`. The `.js` asset loader now patches only three.js's
|
|
22
|
+
shader unroller; `WebGLRenderer` runs on the real backend and there is no
|
|
23
|
+
Canvas2D fallback. Shadow maps (comparative `sampler2DShadow` targeting depth
|
|
24
|
+
textures), cube textures/environment maps and HDR render targets are supported.
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
|
|
@@ -80,6 +81,27 @@
|
|
|
80
81
|
not CSS properties here). Vector art that needs those has to be rasterised
|
|
81
82
|
beforehand, drawn from boxes, or restricted to the supported syntax. See
|
|
82
83
|
[Media](./media.md#images-m6a).
|
|
84
|
+
- **Rendering is still whole-document per change.** A DOM mutation recomputes
|
|
85
|
+
the cascade and lays out the complete document again (there is no incremental
|
|
86
|
+
subtree invalidation), and a change that only affects paint (a hover colour,
|
|
87
|
+
for example) reflows too. Documents with generated content
|
|
88
|
+
(`::before`/`::after`) are not special-cased. The measured cost of each stage
|
|
89
|
+
is exposed by `win.stats()`/`XT_GUI_PERF`, which is what a follow-up would be
|
|
90
|
+
keyed off; see [Performance](./rendering.md#performance-m20).
|
|
91
|
+
- **Draw calls follow painter order.** Runs only merge when they are
|
|
92
|
+
consecutive in painter order and share pipeline, clip and texture, so a list
|
|
93
|
+
whose rows alternate a background and text costs one shape run and one text
|
|
94
|
+
run per row (`drawCalls` in `win.stats()`). Reordering for fewer draw calls
|
|
95
|
+
needs an overlap-aware batcher (text may be covered by a later background) and
|
|
96
|
+
is not implemented. Measured: the 200-row perf page issues 400 draw calls and
|
|
97
|
+
spends about 0.4 ms in the draw phase, so this is a follow-up for
|
|
98
|
+
draw-call-dominated pages rather than the current bottleneck.
|
|
99
|
+
- **The text shaping cache is bounded.** Two generations of up to 2 MiB of
|
|
100
|
+
glyphs / 8,192 entries hold `(face, text) -> glyphs`. A document with more
|
|
101
|
+
distinct words than that re-shapes some of them after a cache rotation;
|
|
102
|
+
`textCacheBytes`/`textShapeHits` in `win.stats()` show whether it is the
|
|
103
|
+
bottleneck. Inline `style="…"` attributes are re-parsed on each restyle of
|
|
104
|
+
the element that carries them.
|
|
83
105
|
|
|
84
106
|
## Open questions
|
|
85
107
|
|
package/doc/gui/rendering.md
CHANGED
|
@@ -160,3 +160,80 @@ cascades but paints nothing.
|
|
|
160
160
|
- Layout uses these real metrics for text widths, line breaking and
|
|
161
161
|
`line-height: normal`; `measureText`/`fontMetrics` expose them to tests.
|
|
162
162
|
|
|
163
|
+
## Performance (M20)
|
|
164
|
+
|
|
165
|
+
The engine is a retained-mode pipeline: a DOM mutation restyles the document,
|
|
166
|
+
lays it out, rebuilds the display list and uploads vertex arrays; a frame that
|
|
167
|
+
changes nothing does no CPU or GPU work. A document with thousands of elements
|
|
168
|
+
is kept interactive by budgeting each stage, and every stage is measured. Set
|
|
169
|
+
`XT_GUI_PERF=1` to print one line per frame (or `XT_GUI_PERF=<N>` for an
|
|
170
|
+
aggregated line every N frames); `win.stats()` returns the same counters, which
|
|
171
|
+
is what `tests/e2e/gui-perf.test.ts` asserts on.
|
|
172
|
+
|
|
173
|
+
- **Cascade.** An `@media` prelude is evaluated **once per rule** per restyle
|
|
174
|
+
(it used to be parsed once per rule *and* node, which was the largest cost on
|
|
175
|
+
a large document). A sheet without `::before`/`::after` rules skips generated
|
|
176
|
+
content entirely, the declaration candidate list is reused across the
|
|
177
|
+
depth-first walk instead of allocated per element, and `:hover`/`:focus` only
|
|
178
|
+
restyle when the sheet actually has such a rule.
|
|
179
|
+
- **Text.** Layout and paint share a bounded shaping cache (`text_cache.cpp`):
|
|
180
|
+
`(face, text) -> glyphs + advance`. It uses two generations of up to 2 MiB of
|
|
181
|
+
glyphs / 8,192 entries; when a generation is full the *spare* one is dropped
|
|
182
|
+
and becomes current, so the hot path has no LRU bookkeeping. A word is shaped
|
|
183
|
+
once and reused by every later layout pass and repaint that draws it. Primary
|
|
184
|
+
face lookups are cached by (family class, size) as well.
|
|
185
|
+
- **Frame loop.** The media/canvas tables are reconciled with the DOM only when
|
|
186
|
+
the document changed (or on the first frame) instead of walking the tree every
|
|
187
|
+
frame. A frame presents only when something happened — a mutation, a scroll,
|
|
188
|
+
an animation frame, a transition, a new video/canvas frame, an expose/resize
|
|
189
|
+
event — so a static page performs no swapchain acquire and no draw at all.
|
|
190
|
+
An expose is the one present the window system asks for rather than the page,
|
|
191
|
+
and `exposes` counts those frames, so `presents - exposes - deferred` stays
|
|
192
|
+
the document's own work even when a window server maps the window late.
|
|
193
|
+
A frame that cannot get a swapchain image (SDL's non-blocking acquire skips a
|
|
194
|
+
frame while the GPU still holds the image, and a minimized window has none)
|
|
195
|
+
keeps its invalidation pending instead of dropping it, so the paint is
|
|
196
|
+
presented on the next frame; those presents are counted as `deferred`.
|
|
197
|
+
`XT_GUI_ALWAYS_PRESENT=1` restores the old always-present behaviour when
|
|
198
|
+
debugging a missed invalidation.
|
|
199
|
+
- **Paint and upload.** The display list and the vertex staging arrays are kept
|
|
200
|
+
on the window and cleared per repaint, so their capacity survives. All of a
|
|
201
|
+
dirty frame's vertex/atlas uploads share one command buffer (one submit),
|
|
202
|
+
the geometry's staging transfer buffer is reused (cycled while the previous
|
|
203
|
+
copy may still be in flight), and paint skips the z-index sort and temporary
|
|
204
|
+
vector when no child stacks.
|
|
205
|
+
- **Draw.** Consecutive ops with the same pipeline, clip and texture still merge
|
|
206
|
+
into one run, and the renderer now only re-binds a pipeline/vertex
|
|
207
|
+
buffer/scissor when it actually changes. `drawCalls`/`drawMs` in `win.stats()`
|
|
208
|
+
report the run count and its cost; they are the metric for the remaining
|
|
209
|
+
follow-up (an overlap-aware batching pass) — painter order requires
|
|
210
|
+
alternating background and text runs to stay separate until that lands.
|
|
211
|
+
- **Immediate-mode surfaces.** `<canvas>` 2D and WebGL draws are script-driven,
|
|
212
|
+
so their cost is per call rather than per document change; the counters above
|
|
213
|
+
cover the retained pipeline only. `tests/e2e/gui-draw-perf.test.ts` measures
|
|
214
|
+
them: on the reference Windows x64/Vulkan machine a 1280×720 frame with 5,000
|
|
215
|
+
solid `fillRect`s, 200 eight-point strokes, 300 `fillText` runs and 200 1:1
|
|
216
|
+
`drawImage`s fell from 231ms to 158ms (fill 4.3ms, stroke 151ms, text 1.4ms,
|
|
217
|
+
image 1.6ms), and 2,000 WebGL `drawElements` calls with a per-draw matrix went
|
|
218
|
+
from 38.6ms to 27.5ms while the render passes opened per frame dropped from
|
|
219
|
+
2,001 to 1 and a 64 KiB `bufferSubData` into a 4 MiB buffer stopped
|
|
220
|
+
re-uploading the whole buffer. A 100×100 canvas redraw now uploads 40 KB
|
|
221
|
+
rather than the whole 1.2 MB bitmap. The suite asserts the counters (one
|
|
222
|
+
upload per frame, no steady-state pipeline creation, only the dirty bytes), so
|
|
223
|
+
the wall-clock numbers stay informational and a software GPU in CI is not
|
|
224
|
+
penalised.
|
|
225
|
+
|
|
226
|
+
Known limits: a mutation still restyles and relayouts the **whole** document
|
|
227
|
+
(there is no incremental subtree invalidation), and a paint-only change (for
|
|
228
|
+
example a hover colour) currently reflows too; `win.stats()` is what a follow-up
|
|
229
|
+
would be keyed off. Inline `style="…"` attributes are re-parsed on every restyle
|
|
230
|
+
of the element that carries them.
|
|
231
|
+
|
|
232
|
+
As a reference point, `tests/e2e/gui-perf.test.ts` builds a 200-row list (about
|
|
233
|
+
1,000 elements, 400 draw runs) and prints the numbers it measured, e.g.
|
|
234
|
+
`textFrame=5.2ms restyle=3.6ms layout=1.7ms paint=1.0ms upload=0.8ms draw=0.4ms`
|
|
235
|
+
for a one-field `textContent` change on a Windows x64/Vulkan machine. The
|
|
236
|
+
absolute values are host-specific; the test asserts the *counters* (one restyle,
|
|
237
|
+
one layout, cache hits instead of shapes, no work on an idle frame), which are
|
|
238
|
+
what a regression would change.
|
|
239
|
+
|
package/doc/gui/runtime.md
CHANGED
|
@@ -18,11 +18,26 @@ expose an explicit `run()`; **M2 uses the explicit `run()`** so the window is a
|
|
|
18
18
|
plain native call the TypeScript program controls. Each tick it:
|
|
19
19
|
|
|
20
20
|
1. pumps SDL window/input events for every window,
|
|
21
|
-
2.
|
|
21
|
+
2. reconciles the decoder/canvas tables with the DOM **only when the document
|
|
22
|
+
changed** (or on the first frame),
|
|
23
|
+
3. builds/uploads the display list when it changed and renders every open
|
|
22
24
|
window (clear pass + shape geometry + text geometry),
|
|
23
|
-
|
|
25
|
+
4. calls `xt_loop_poll(0)` and `xt_drain_microtasks()` so sockets/timers and
|
|
24
26
|
`await` continuations keep making progress,
|
|
25
|
-
|
|
27
|
+
5. repeats until all windows close or `quit()` is called.
|
|
28
|
+
|
|
29
|
+
A frame **presents only when something happened**: a DOM mutation, a scroll, a
|
|
30
|
+
queued animation frame, a running transition, a new video/canvas frame, an
|
|
31
|
+
expose/resize event, or the first frame. A static document therefore performs no
|
|
32
|
+
swapchain acquire and no draw while the loop keeps servicing events, timers and
|
|
33
|
+
promises; `XT_GUI_ALWAYS_PRESENT=1` restores the old always-present behaviour
|
|
34
|
+
when debugging a missed invalidation. An expose/shown/restore event is the one
|
|
35
|
+
present the *window system* asks for rather than the document, so it is counted
|
|
36
|
+
as `exposes` in `win.stats()`; a present a starved frame had to postpone (no
|
|
37
|
+
swapchain image was available) is counted as `deferred`, and
|
|
38
|
+
`presents - exposes - deferred` is the work the page caused. `XT_GUI_PERF=1`
|
|
39
|
+
prints what each frame did (see
|
|
40
|
+
[Performance](./rendering.md#performance-m20)).
|
|
26
41
|
|
|
27
42
|
The `xt_loop_set_main` hook remains available for hosts that want to own the
|
|
28
43
|
loop themselves.
|