mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Auto merge of #24408 - servo:jdm-patch-31, r=Manishearth
Synchronize WebGL layer creation with underlying GL APIs I believe the underlying cause of #24373 is that the XR callbacks can end up executing before the XR WebGL layer setup has occurred. This was observed in the following symptom: * a DOM exception would be thrown from inside the renderVR function, which is only called from XR's requestAnimationFrame callback * following this, the webgl thread would panic with a GL error when executing the GL operations invoked from XRWebGLLayer::Constructor This indicates that _somehow_ the XR rAF callback that raised an exception would have been operating on GL state that was not actually the state intended. <!-- 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/24408) <!-- Reviewable:end -->
This commit is contained in:
commit
9b59a11b7c
1 changed files with 3 additions and 0 deletions
|
@ -192,6 +192,9 @@ impl XRWebGLLayer {
|
|||
return Err(Error::Operation);
|
||||
}
|
||||
|
||||
// Ensure that we finish setting up this layer before continuing.
|
||||
context.Finish();
|
||||
|
||||
// Step 10. "Return layer."
|
||||
Ok(XRWebGLLayer::new(
|
||||
&global.global(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue