Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix canvas.ready never resolve when switch to webgl, webgpu renderer #1737

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

Aarebecca
Copy link
Contributor

  • 修复调用 setRenderer 切换渲染器后立即获取 canvas.ready 无法 resolve 的问题

原因是切换到 canvassvg 渲染器是同步操作,而 webgl webgpu 是异步操作,导致获取 canvas.ready 前 this.inited 为 false,resolveReadyPromise 又仅在首次绘制时执行,故导致 ready 永远无法 resolve

@Aarebecca Aarebecca merged commit 9b77184 into release Jul 18, 2024
3 checks passed
@Aarebecca Aarebecca deleted the fix/canvas-ready branch July 18, 2024 09:41
Aarebecca added a commit that referenced this pull request Jul 18, 2024
* fix: fix canvas.ready never resolve when switch to webgl, webgpu renderer (#1737)

* fix: fix canvas.ready never resolve when switch to webgl, webgpu renderer

* test: add test case

* chore: update version (#1739)

* chore(release): bump version (#1740)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants