-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Unify GL bindings behind glow #33539
Description
Currently servo is using multiple GL bindings: glow, sparkle and gleam (with last two being part of servo organization). Per discussion in https://servo.zulipchat.com/#narrow/stream/263398-general/topic/GL.20Bindings we should migrate to glow which is the only one that is actually actively maintained and used by wgpu and wider rust community. With that being done we can archive sparkle and gleam and lower number of deps (faster compilation and smaller binary size).
Usage trees:
sparkle v0.1.26 ✅
├── surfman servo/surfman#318
├── canvas #33918
├── canvas_traits #34292
├── libservo #33910
├── script #33911
└── webxr servo/webxr#248
gleam v0.15.0 (all usage is actually due to webrender)
├── compositing
├── libservo
├── servoshell
└── webrender
Then there is also some usages of gl_generator that would be nice to be removed too (thus removing build scripts and duplication), but gl_generator can be used for GL/GLES or EGL bindings. The last case cannot be replaced with glow, as it involves context creation (but we might be able to migrate to glutin for that, this is yet to be investigated).
gl_generator v0.14.0
[build-dependencies]
├── gleam
├── sparkle #33918
├── mozangle (only on windows; GLES, EGL)
├── servoshell (EGL) #34716
└── surfman (GL, GLES, EGL) servo/surfman#321
Action points:
- remove sparkle from surfman&webxr: Update to surfman&webxr without sparkle and use glow 0.15 #33538
- remove sparkle from rest of the servo Replace
sparklewithglowincomponents/canvas#33918 - replace gl_generated GL/GLES in surfman with glow: Use
glowinstead ofgl_generatorfor GL/GLES bindings surfman#321 - investigate replacing gl_generated EGL with glutin???
- remove gleam from webrender (will require coordination with mozilla if they are OK with plan).