Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWebrender no nativewindow #10842
Webrender no nativewindow #10842
Conversation
highfive
commented
Apr 25, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Apr 25, 2016
| @@ -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() { | |||
This comment has been minimized.
This comment has been minimized.
frewsxcv
Apr 25, 2016
•
Member
if let Some(ref native_display) = self.native_display {
self.surface_map.insert_surfaces(native_display, native_surfaces);
}| @@ -2309,7 +2317,9 @@ impl<Window: WindowMethods> IOCompositor<Window> { | |||
| where B: IntoIterator<Item=Box<LayerBuffer>> | |||
| { | |||
| let surfaces = buffers.into_iter().map(|buffer| buffer.native_surface); | |||
| self.surface_map.insert_surfaces(&self.native_display, surfaces); | |||
| if self.native_display.is_some() { | |||
This comment has been minimized.
This comment has been minimized.
3970b67
to
cc3c80a
|
@bors-servo r+ |
|
|
…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 -->
|
|
| @@ -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(), | |||
This comment has been minimized.
This comment has been minimized.
Manishearth
Apr 26, 2016
Member
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 |
|
|
|
@bors r+ |
|
@bors-servo r+ |
|
|
…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 -->
|
|
| @@ -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. | |||
This comment has been minimized.
This comment has been minimized.
Manishearth
Apr 26, 2016
Member
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
|
@bors-servo r=Manishearth |
|
|
…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 -->
|
|
fabricedesre commentedApr 25, 2016
@glennw this fixed the panic when using webrender and no native display is available.
This change is