diff options
author | bors-servo <servo-ops@mozilla.com> | 2020-11-08 07:24:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-08 07:24:22 -0500 |
commit | bbdaf2262058fde6a938ccb47266e61b388d9727 (patch) | |
tree | 09e64bba9fac0863ba10d39f7fa1e8b57d0bf902 | |
parent | 534fdd70e8a42eeb56c0c95b9b1ea1002ab9098c (diff) | |
parent | 7119eb7471e4850f8a69ed2973216256aad38707 (diff) | |
download | servo-bbdaf2262058fde6a938ccb47266e61b388d9727.tar.gz servo-bbdaf2262058fde6a938ccb47266e61b388d9727.zip |
Auto merge of #27743 - lorenzbutter:master, r=jdm
Call eglMakeCurrent with non-null surfaces before anything else
First call to eglMakeCurrent with no draw or read surface leads to black window on Nvidia/X11. This change ensures first call to eglMakeCurrent made with non-null surfaces.
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #26353 (GitHub issue number if applicable)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because ___
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
-rw-r--r-- | components/webrender_surfman/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/components/webrender_surfman/lib.rs b/components/webrender_surfman/lib.rs index 533614256c1..9460417dc7e 100644 --- a/components/webrender_surfman/lib.rs +++ b/components/webrender_surfman/lib.rs @@ -80,6 +80,9 @@ impl WebrenderSurfman { let _ = device.destroy_surface(&mut context, &mut surface); err })?; + + device.make_context_current(&context)?; + let swap_chain = if headless { Some(SwapChain::create_attached( &mut device, |