Open kekekeks opened 5 years ago
Basically we need something like this:
with proper locks to avoid concurrent access to: 1) GrContext 2) OpenGL 3) SkSurface 4) OpenGL texture
Also, we need to make sure that GrContext/OpenGL context are properly switched when drawing context is created and destroyed.
Note: some requirements that any other proposed solution has to meet
For now it was disabled because of threading issues and memory corruption: https://github.com/AvaloniaUI/Avalonia/pull/2615
It can be easily reproduced on Linux with GLX and requires some less trivial steps on Windows with EGL/ANGLE. Haven't checked on OSX, but I suspect that the firework there would be even more spectacular.
I had several attempts to fix it in rtb-gl-fixes branch, but it seems that we need to have two
GrContext
instances with appropriate locking model.