mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Auto merge of #19910 - glennw:fix-18606, r=jdm
Add a workaround for headless output sometimes being blank. 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. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19910) <!-- Reviewable:end -->
This commit is contained in:
commit
b900664c1a
1 changed files with 8 additions and 0 deletions
|
@ -1408,6 +1408,14 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
||||||
width: usize,
|
width: usize,
|
||||||
height: usize)
|
height: usize)
|
||||||
-> RgbImage {
|
-> 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 https://github.com/servo/servo/issues/18606.
|
||||||
|
self.gl.bind_vertex_array(0);
|
||||||
|
|
||||||
let mut pixels = self.gl.read_pixels(0, 0,
|
let mut pixels = self.gl.read_pixels(0, 0,
|
||||||
width as gl::GLsizei,
|
width as gl::GLsizei,
|
||||||
height as gl::GLsizei,
|
height as gl::GLsizei,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue