Defer the EAGLDevice background gate until applicationDidEnterBackground.#1460
Merged
Conversation
Hparty
reviewed
May 29, 2026
| // to leave the GPU in a quiescent state. This avoids doing a long glFinish() inside | ||
| // applicationDidEnterBackground:, which has a strict ~5s execution window before iOS terminates | ||
| // the process. | ||
| std::vector<std::shared_ptr<EAGLDevice>> devices = {}; |
Collaborator
There was a problem hiding this comment.
这里要移动就都移动了,不能漏。漏了有可能后续还有新的gl命令
07e7130 to
af8788b
Compare
…to avoid GL deletions racing with new draw calls.
Hparty
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
之前 iOS 端在 applicationWillResignActive 中就将 appInBackground 置为 true,导致诸如来电、控制中心下拉、分享面板弹出等场景下,app 仍处于前台但渲染已被阻塞(GLDevice::Current()/Make() 直接返回 nullptr),出现画面停滞或闪烁。
本次调整将后台闸门延后到真正进入后台时再关闭:
效果:来电、控制中心、分享面板等短暂离焦但未进入后台的场景下,渲染不再中断;真正进入后台的安全边界与原有一致。