Auto merge of #19547 - tigercosmos:b1, r=jdm

Send IPC receiver for canvas as part of CreateCanvasPaintThread message

<!-- Please describe your changes on the following line: -->
I am not sure if @jdm want this.
r? @jdm

---
<!-- 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 #19483(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/19547)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-12-16 11:35:40 -06:00 committed by GitHub
commit c9e3fabdfd
4 changed files with 13 additions and 18 deletions

View file

@ -11,7 +11,7 @@ use azure::azure_hl::SurfacePattern;
use canvas_traits::canvas::*;
use cssparser::RGBA;
use euclid::{Transform2D, Point2D, Vector2D, Rect, Size2D};
use ipc_channel::ipc::{self, IpcSender};
use ipc_channel::ipc::{self, IpcSender, IpcReceiver};
use num_traits::ToPrimitive;
use std::borrow::ToOwned;
use std::mem;
@ -118,9 +118,8 @@ impl<'a> CanvasPaintThread<'a> {
/// communicate with it.
pub fn start(size: Size2D<i32>,
webrender_api_sender: webrender_api::RenderApiSender,
antialias: bool)
-> IpcSender<CanvasMsg> {
let (sender, receiver) = ipc::channel::<CanvasMsg>().unwrap();
antialias: bool,
receiver: IpcReceiver<CanvasMsg>) {
let antialias = if antialias {
AntialiasMode::Default
} else {
@ -216,8 +215,6 @@ impl<'a> CanvasPaintThread<'a> {
}
}
}).expect("Thread spawning failed");
sender
}
fn save_context_state(&mut self) {