This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Reset the native renderer only when the GL thread exits #14841
Merged
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.
Closes #14618.
Closes #14592.
Closes #14252.
Closes #14463.
Closes #14554. It still blocks when scrolling a map inside a recycler, which is unavoidable because we are detaching the view, but it doesn't block for
#onStop
anymore.Also doesn't force tiles to reload after coming back from the background (refs #12844 (comment)).
Hopefully, this should also replace #14821. Since we are not resetting the native renderer when the
GLSurfaceView
is still able to render, we are not going to run into a missing pointer scenario. When running the introduced in #14821 test, I'm seeing:Can this just be an issue with the test itself, where we're trying to force the surface to draw when it wouldn't in real-world case? Otherwise, I can reintroduce the
hasSurface
flag just to cover this one edge case, still without resetting the pointer.All of the previously introduced integration tests are passing for me, but if we'd like to move forward with this, a device farm test run would be great.