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

@ -1235,9 +1235,9 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
self.embedder_proxy.send(EmbedderMsg::HeadParsed(source_top_ctx_id));
}
}
FromScriptMsg::CreateCanvasPaintThread(size, sender) => {
FromScriptMsg::CreateCanvasPaintThread(size, receiver) => {
debug!("constellation got create-canvas-paint-thread message");
self.handle_create_canvas_paint_thread_msg(&size, sender)
self.handle_create_canvas_paint_thread_msg(&size, receiver)
}
FromScriptMsg::NodeStatus(message) => {
debug!("constellation got NodeStatus message");
@ -2264,13 +2264,12 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
fn handle_create_canvas_paint_thread_msg(
&mut self,
size: &Size2D<i32>,
response_sender: IpcSender<IpcSender<CanvasMsg>>) {
receiver: IpcReceiver<CanvasMsg>) {
let webrender_api = self.webrender_api_sender.clone();
let sender = CanvasPaintThread::start(*size, webrender_api,
opts::get().enable_canvas_antialiasing);
if let Err(e) = response_sender.send(sender) {
warn!("Create canvas paint thread response failed ({})", e);
}
CanvasPaintThread::start(*size,
webrender_api,
opts::get().enable_canvas_antialiasing,
receiver);
}
fn handle_webdriver_msg(&mut self, msg: WebDriverCommandMsg) {