-
Notifications
You must be signed in to change notification settings - Fork 6k
[WIP]Fix OpenGL leak on Android and iOS #28506
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
cc @xster @gaaclarke for visibility |
See flutter/flutter#87937 (comment) The engine should not be calling This PR is not building though - there is no If the goal is to have |
@jason-simmons I agree that the change is not safe, what about calling |
This reverts commit 6b84b8e.
@jason-simmons I have updated my PR with this solution, what do you think? If the solution is ok, I'll patch some tests. |
The issue is that the graphics context sharing mechanism allows multiple |
…n rasterizer task runner when destructing Shell
I believe this PR has been made obsolete by some work that @gaaclarke has in progress. Please feel free to re-open if I am mistaken. |
Fix flutter/flutter#89658
Both destructors of AndroidContext and IOSContextGL are called on the platform thread, which is a wrong thread to release OpenGL resources.
Instead, this PR calls
GrDirectContext::releaseResourcesAndAbandonContext()
explictly on rasiterizer task running.I'm working on investigating a property solution and adding tests.
Related PRs
Pre-launch Checklist
writing and running engine tests.
///
).