fix(web): make WASM compositor evaluation produce an image
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

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:
mes123456
2026-11-14 07:54:31 +08:00
parent fe253bd9b2
commit 0274b58c18
8 changed files with 44 additions and 14 deletions

View File

@@ -20725,6 +20725,11 @@ bool web_engine_blend_main_compositor_evaluate(WebBlendMainState *state,
* Compositing workspace has no 3D viewport). The GPU compositor path calls
* DRW_gpu_context_enable and fails in that state; force CPU for this preview
* evaluation and restore the scene setting immediately afterwards. */
/* The preview evaluation does not run a render engine, so no RenderResult is
* created. Initialize the render state (empty result and default view) so the
* compositor can write its combined output. */
RE_InitState(render, nullptr, &scene->r, &scene->view_layers, nullptr,
scene->r.xsch, scene->r.ysch, nullptr);
const eCompositorDevice previous_device = scene->r.compositor_device;
scene->r.compositor_device = SCE_COMPOSITOR_DEVICE_CPU;
try {