Currently every offscreen surfaces share the same root context even though they can be created from different thread.
This can easily cause crashes, especially in viewRef.makeImageSnapshot which is using an offscreen surface.
We also suspect that because onscreen surfaces are using the parent context where all the offscreen surfaces are created with, it may also cause some error.
We also took advantage of the issue to make a refactoring of the OpenGL logic.
Currently every offscreen surfaces share the same root context even though they can be created from different thread. This can easily cause crashes, especially in
viewRef.makeImageSnapshot
which is using an offscreen surface.We also suspect that because onscreen surfaces are using the parent context where all the offscreen surfaces are created with, it may also cause some error.
We also took advantage of the issue to make a refactoring of the OpenGL logic.