Skip to content

perf(editor): decouple viewport frame readback - #367

Open
Excurs1ons wants to merge 1 commit into
masterfrom
feat/editor-viewport-performance
Open

Excurs1ons wants to merge 1 commit into
masterfrom
feat/editor-viewport-performance

Conversation

@Excurs1ons

Copy link
Copy Markdown
Owner

🤖 Agent: OpenCode (GPT-6.1 Sol)

Why

SceneView/GameView suffered from synchronous GPU readback and frame delivery on the viewport thread. This change removes the blocking readback wait and prevents slow IPC/canvas consumers from building a stale frame queue.

Changes

  • Submit offscreen image copies asynchronously and poll their fences on later frames.
  • Keep only the latest completed viewport frame and send at a bounded 60 FPS on a dedicated thread.
  • Coalesce WebView paints with requestAnimationFrame and reuse ImageData.

Verify

  • pnpm build (editor): passed.
  • cargo fmt --all and git diff --check: passed.
  • python3 scripts/pr_ready.py --quick: formatting/artifact checks passed; clippy could not run because generated assets/shaders/*.spv files are absent in this environment.

Runtime FPS validation on a Vulkan desktop is still required.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-27T17:58:18.898668Z
We couldn’t complete this review. Comment @codex review to try again.
b22e8d3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions Bot added the needs/self-check PR 缺少 pr_ready 自检块 label Oct 27, 2026
@github-actions

Copy link
Copy Markdown

缺少 python scripts/pr_ready.py 的自检块。请运行后把打印的 Markdown(包含 **Result: 那一行)贴进 PR 正文。

@github-actions github-actions Bot added area/engine engine / app / platform / audio area/render Vulkan 渲染、shader、swapchain area/editor Web 编辑器与 prism-editor-api size/m 改动 100–499 行 labels Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/editor Web 编辑器与 prism-editor-api area/engine engine / app / platform / audio area/render Vulkan 渲染、shader、swapchain needs/self-check PR 缺少 pr_ready 自检块 size/m 改动 100–499 行

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant