[egl] add additional check against eglcontext#723
Conversation
| Log.e(TAG, "mEglConfig not initialized"); | ||
| return false; | ||
| } | ||
| if (mEglContext == null) { |
There was a problem hiding this comment.
Wonder what the outcome would be, if we skip init here black map?
Also, to help debugging, I'd probably enriched logs a bit, like Could not create surface for drawing, mEglContext not initialized
kiryldz
left a comment
There was a problem hiding this comment.
LGTM
Pretty curious when / why exactly this does happen.
Do I get it correctly that we will try to recreate whole EGL setup when returning false here? Might be pretty much imho, it should be sufficient try to re-acquire context but this solution should work
|
|
yunikkk
left a comment
There was a problem hiding this comment.
Seems ok, not sure if the lack of space error from driver will dissappear on the following iterations of the loop.
Otherwise suppose map will just be black, it seems.
Maybe would be a good idea to have some callback/status API that allows developers to show some error message if we fail to initialize the map
Let's try this out for |
Right, that's what I suggested - definitely wouldn't want to introduce this changes to the Hydrogen |
This PR adds an additional check against eglContext being null. This avoids having our GL context in an invalid state and as results run into an IllegalArgumentException on the OS level.