fix(web): make WASM compositor evaluation produce an image
Initialize the preview RenderResult before compositing and serve the result via a blob URL so the deployment CSP accepts it. Verified RGB→Composite returns 1024×1024 and the Properties button displays it. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -462,11 +462,15 @@
|
||||
`web_engine_blend_main_compositor_evaluate` 中临时把
|
||||
`scene.r.compositor_device` 切到 CPU(求值后恢复),消除该 GPU
|
||||
上下文依赖(WASM `198d2f01...`)。
|
||||
- 用正确命令 `setCompositorNodeGraph` 提交 `RGB → Composite` 图(原生
|
||||
树确认为 `CompositorNodeRGB.Color → NodeGroupOutput.Image`)后,
|
||||
`compositorEvaluate` 仍返回 `INVALID_ARGUMENT: COMPOSITOR_RESULT_MISSING`。
|
||||
这是当前 WASM 合成求值的真实残余阻塞,需要补齐 RenderResult/
|
||||
have_combined 初始化;证据 `probe-compositor-eval.mjs`。
|
||||
- 用正确命令 `setCompositorNodeGraph` 提交 `RGB → Composite` 图后,
|
||||
求值仍报 `COMPOSITOR_RESULT_MISSING`;已在该函数中先调用
|
||||
`RE_InitState` 创建空 RenderResult/默认视图,使合成输出可写入
|
||||
`have_combined`。
|
||||
- 复测:`compositorEvaluate` 返回 1024×1024、5,592,408 字节 base64;
|
||||
Properties → `WASM 合成求值` 显示图像,状态 `WASM 合成 1024×1024`。
|
||||
- 结果图原用 `data:` URL 被部署 CSP(`img-src 'self' blob:`)拦截;
|
||||
已改为 `URL.createObjectURL` 的 blob URL。WASM `be87a9ad...`。
|
||||
证据 `tools/web/complete/probe-compositor-eval.mjs`。
|
||||
|
||||
## 下一动作
|
||||
|
||||
|
||||
Reference in New Issue
Block a user