You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use texture sharing instead of shared GL context #133
The root of the problem is that Servo used shared OpenGL contexts to share WebGL textures
instead of using texture primitives that could be shared among different threads/processes
without requiring a shared GL context (e.g. SurfaceTextures on Andriod, IOSurface on Mac, etc)
For Firefox Reality immersive mode we need a SurfaceTexture on Android.
I think this would be the approach for Servo immersive mode on Android:
Create a render target to a GL_EXTERNAL_TEXTURE_2D with its SurfaceTexture instead of a GL_TEXTURE_2D in Servo WebGLContext
WebRender should be updated to render using GL_EXTERNAL_TEXTURE_2D extension (for flat WebGL)
FxR can use the same SurfaceTexture for immersive mode. This works even if Servo is in another process so we don't need GL context sharing.
In order to share the SurfaceTexture, we need to share the java instance, it's not enough with the OpenGL texture id:
The global SurfaceTexture can be attached to different GL_textures depending on the GL context where its bound (e.g. it can use glTexId 2 in Webrender GL context, but 4 in FxR render context)
The textureId/texName for a SurfaceTexture can be changed by calling attachToGLContext so we can only share the java object reliably
Activity
paulrouget commentedon Apr 8, 2019
We also need a
SurfaceTextureon Android.MortimerGoro commentedon Apr 9, 2019
For Firefox Reality immersive mode we need a SurfaceTexture on Android.
I think this would be the approach for Servo immersive mode on Android:
In order to share the SurfaceTexture, we need to share the java instance, it's not enough with the OpenGL texture id:
MortimerGoro commentedon Apr 9, 2019
It would be nice to combine the shared textures with this: #131
asajeffrey commentedon Oct 11, 2019
The relevant repo is https://github.com/pcwalton/surfman
jdm commentedon Nov 20, 2019
Fixed by https://github.com/pcwalton/surfman.