Auto merge of #17068 - gterzian:remove_compositorproxy, r=asajeffrey

Separate waking the event loop, from communicating with Compositor

<!-- Please describe your changes on the following line: -->

@paulrouget first step of #15934, Glutin only for now, please take a look...

If this makes sense, I will also update the code for ports other than Glutin...

One question: one do I add the `warn!` macro to `servolib`? Also perhaps we would also want to add `box`, since I had to switch to using `Box::new`...

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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/17068)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-06-07 05:52:35 -07:00 committed by GitHub
commit 7e273d6c9b
9 changed files with 103 additions and 108 deletions

View file

@ -172,7 +172,7 @@ pub struct Constellation<Message, LTF, STF> {
/// A channel (the implementation of which is port-specific) for the
/// constellation to send messages to the compositor thread.
compositor_proxy: Box<CompositorProxy>,
compositor_proxy: CompositorProxy,
/// Channels for the constellation to send messages to the public
/// resource-related threads. There are two groups of resource
@ -302,7 +302,7 @@ pub struct Constellation<Message, LTF, STF> {
/// State needed to construct a constellation.
pub struct InitialConstellationState {
/// A channel through which messages can be sent to the compositor.
pub compositor_proxy: Box<CompositorProxy + Send>,
pub compositor_proxy: CompositorProxy,
/// A channel to the debugger, if applicable.
pub debugger_chan: Option<debugger::Sender>,

View file

@ -69,7 +69,7 @@ pub struct Pipeline {
pub layout_chan: IpcSender<LayoutControlMsg>,
/// A channel to the compositor.
pub compositor_proxy: Box<CompositorProxy + 'static + Send>,
pub compositor_proxy: CompositorProxy,
/// The most recently loaded URL in this pipeline.
/// Note that this URL can change, for example if the page navigates
@ -123,7 +123,7 @@ pub struct InitialPipelineState {
pub scheduler_chan: IpcSender<TimerSchedulerMsg>,
/// A channel to the compositor.
pub compositor_proxy: Box<CompositorProxy + 'static + Send>,
pub compositor_proxy: CompositorProxy,
/// A channel to the developer tools, if applicable.
pub devtools_chan: Option<Sender<DevtoolsControlMsg>>,
@ -303,7 +303,7 @@ impl Pipeline {
parent_info: Option<(PipelineId, FrameType)>,
event_loop: Rc<EventLoop>,
layout_chan: IpcSender<LayoutControlMsg>,
compositor_proxy: Box<CompositorProxy + 'static + Send>,
compositor_proxy: CompositorProxy,
is_private: bool,
url: ServoUrl,
visible: bool)