New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webrender no nativewindow #10842
Webrender no nativewindow #10842
Conversation
Heads up! This PR modifies the following files:
|
@@ -572,7 +577,9 @@ impl<Window: WindowMethods> IOCompositor<Window> { | |||
|
|||
(Msg::ReturnUnusedNativeSurfaces(native_surfaces), | |||
ShutdownState::NotShuttingDown) => { | |||
self.surface_map.insert_surfaces(&self.native_display, native_surfaces); | |||
if self.native_display.is_some() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if let Some(ref native_display) = self.native_display {
self.surface_map.insert_surfaces(native_display, native_surfaces);
}
3970b67
to
cc3c80a
Compare
@bors-servo r+ |
📌 Commit cc3c80a has been approved by |
…shearth Webrender no nativewindow @glennw this fixed the panic when using webrender and no native display is available. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10842) <!-- Reviewable:end -->
💔 Test failed - linux-dev |
@@ -2220,7 +2227,8 @@ impl<Window: WindowMethods> IOCompositor<Window> { | |||
fn initialize_compositing(&mut self) { | |||
if self.webrender.is_none() { | |||
let show_debug_borders = opts::get().show_debug_borders; | |||
self.context = Some(rendergl::RenderContext::new(self.native_display.clone(), | |||
// We can unwrap() native_display because it's only None when using webrender. | |||
self.context = Some(rendergl::RenderContext::new(self.native_display.unwrap().clone(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use .expect("native_display should be Some when not using Webrender")
instead of .unwrap()
@bors-servo delegate+ feel free to r=me after you fix the unwrap |
✌️ @fabricedesre can now approve this pull request |
@bors r+ |
@bors-servo r+ |
📌 Commit 92526a4 has been approved by |
…shearth Webrender no nativewindow @glennw this fixed the panic when using webrender and no native display is available. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10842) <!-- Reviewable:end -->
💔 Test failed - linux-dev |
@@ -2220,7 +2227,9 @@ impl<Window: WindowMethods> IOCompositor<Window> { | |||
fn initialize_compositing(&mut self) { | |||
if self.webrender.is_none() { | |||
let show_debug_borders = opts::get().show_debug_borders; | |||
self.context = Some(rendergl::RenderContext::new(self.native_display.clone(), | |||
// We can unwrap() native_display because it's only None when using webrender. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh, CI doesn't like this comment, just make it unwrap
instead of unwrap()
Run etc/ci/check_no_unwrap.sh to verify it works, and squash the commits. Feel free to @bors-servo r=Manishearth
after that.
92526a4
to
aac7101
Compare
@bors-servo r=Manishearth |
📌 Commit aac7101 has been approved by |
…shearth Webrender no nativewindow @glennw this fixed the panic when using webrender and no native display is available. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10842) <!-- Reviewable:end -->
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt |
@glennw this fixed the panic when using webrender and no native display is available.
This change is