mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #17505 - cbrewster:less_blocking, r=asajeffrey,glennw
Remove unnecessary `recv` in the constellation <!-- Please describe your changes on the following line: --> --- <!-- 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 - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] 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. --> <!-- 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/17505) <!-- Reviewable:end -->
This commit is contained in:
commit
82f65f6eb3
3 changed files with 6 additions and 17 deletions
|
@ -10,7 +10,7 @@ use euclid::{Point2D, TypedPoint2D, TypedVector2D, TypedRect, ScaleFactor, Typed
|
||||||
use gfx_traits::Epoch;
|
use gfx_traits::Epoch;
|
||||||
use gleam::gl;
|
use gleam::gl;
|
||||||
use image::{DynamicImage, ImageFormat, RgbImage};
|
use image::{DynamicImage, ImageFormat, RgbImage};
|
||||||
use ipc_channel::ipc::{self, IpcSender, IpcSharedMemory};
|
use ipc_channel::ipc::{self, IpcSharedMemory};
|
||||||
use msg::constellation_msg::{Key, KeyModifiers, KeyState, CONTROL};
|
use msg::constellation_msg::{Key, KeyModifiers, KeyState, CONTROL};
|
||||||
use msg::constellation_msg::{PipelineId, PipelineIndex, PipelineNamespaceId, TraversalDirection};
|
use msg::constellation_msg::{PipelineId, PipelineIndex, PipelineNamespaceId, TraversalDirection};
|
||||||
use net_traits::image::base::{Image, PixelFormat};
|
use net_traits::image::base::{Image, PixelFormat};
|
||||||
|
@ -459,9 +459,9 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
||||||
self.change_page_title(pipeline_id, title);
|
self.change_page_title(pipeline_id, title);
|
||||||
}
|
}
|
||||||
|
|
||||||
(Msg::SetFrameTree(frame_tree, response_chan),
|
(Msg::SetFrameTree(frame_tree),
|
||||||
ShutdownState::NotShuttingDown) => {
|
ShutdownState::NotShuttingDown) => {
|
||||||
self.set_frame_tree(&frame_tree, response_chan);
|
self.set_frame_tree(&frame_tree);
|
||||||
self.send_viewport_rects();
|
self.send_viewport_rects();
|
||||||
self.title_for_main_frame();
|
self.title_for_main_frame();
|
||||||
}
|
}
|
||||||
|
@ -673,13 +673,8 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_frame_tree(&mut self,
|
fn set_frame_tree(&mut self, frame_tree: &SendableFrameTree) {
|
||||||
frame_tree: &SendableFrameTree,
|
|
||||||
response_chan: IpcSender<()>) {
|
|
||||||
debug!("Setting the frame tree for pipeline {}", frame_tree.pipeline.id);
|
debug!("Setting the frame tree for pipeline {}", frame_tree.pipeline.id);
|
||||||
if let Err(e) = response_chan.send(()) {
|
|
||||||
warn!("Sending reponse to set frame tree failed ({}).", e);
|
|
||||||
}
|
|
||||||
|
|
||||||
self.root_pipeline = Some(frame_tree.pipeline.clone());
|
self.root_pipeline = Some(frame_tree.pipeline.clone());
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ pub enum Msg {
|
||||||
/// Alerts the compositor that the given pipeline has changed whether it is running animations.
|
/// Alerts the compositor that the given pipeline has changed whether it is running animations.
|
||||||
ChangeRunningAnimationsState(PipelineId, AnimationState),
|
ChangeRunningAnimationsState(PipelineId, AnimationState),
|
||||||
/// Replaces the current frame tree, typically called during main frame navigation.
|
/// Replaces the current frame tree, typically called during main frame navigation.
|
||||||
SetFrameTree(SendableFrameTree, IpcSender<()>),
|
SetFrameTree(SendableFrameTree),
|
||||||
/// The load of a page has begun
|
/// The load of a page has begun
|
||||||
LoadStart,
|
LoadStart,
|
||||||
/// The load of a page has completed
|
/// The load of a page has completed
|
||||||
|
|
|
@ -2870,13 +2870,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
||||||
// with low-resource scenarios.
|
// with low-resource scenarios.
|
||||||
debug!("Sending frame tree for browsing context {}.", browsing_context_id);
|
debug!("Sending frame tree for browsing context {}.", browsing_context_id);
|
||||||
if let Some(frame_tree) = self.browsing_context_to_sendable(browsing_context_id) {
|
if let Some(frame_tree) = self.browsing_context_to_sendable(browsing_context_id) {
|
||||||
let (chan, port) = ipc::channel().expect("Failed to create IPC channel!");
|
self.compositor_proxy.send(ToCompositorMsg::SetFrameTree(frame_tree));
|
||||||
self.compositor_proxy.send(ToCompositorMsg::SetFrameTree(frame_tree,
|
|
||||||
chan));
|
|
||||||
if port.recv().is_err() {
|
|
||||||
warn!("Compositor has discarded SetFrameTree");
|
|
||||||
return; // Our message has been discarded, probably shutting down.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue