Skip to content


Add a workaround for headless output sometimes being blank.
Browse files Browse the repository at this point in the history
I *think* this is a bug in OSMesa, as the fix here makes no
sense to me. But nonetheless, this change does seem to reliably
fix the headless output issues as reported.

Fixes #18606.
  • Loading branch information
gw3583 committed Jan 31, 2018
1 parent 469dc84 commit 04977ae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/compositing/
Expand Up @@ -1408,6 +1408,14 @@ impl<Window: WindowMethods> IOCompositor<Window> {
width: usize,
height: usize)
-> RgbImage {
// For some reason, OSMesa fails to render on the 3rd
// attempt in headless mode, under some conditions.
// I think this can only be some kind of synchronization
// bug in OSMesa, but explicitly un-binding any vertex
// array here seems to work around that bug.
// See;

let mut pixels =, 0,
width as gl::GLsizei,
height as gl::GLsizei,
Expand Down

0 comments on commit 04977ae

Please sign in to comment.