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 upSend IPC receiver for canvas as part of CreateCanvasPaintThread message #19547
Conversation
highfive
commented
Dec 12, 2017
|
Heads up! This PR modifies the following files:
|
highfive
commented
Dec 12, 2017
|
@jdm Could you check this? |
|
Good start, but we want to remove the synchronous communication entirely. |
| @@ -118,9 +118,10 @@ impl<'a> CanvasPaintThread<'a> { | |||
| /// communicate with it. | |||
| pub fn start(size: Size2D<i32>, | |||
| webrender_api_sender: webrender_api::RenderApiSender, | |||
| antialias: bool) | |||
| antialias: bool, | |||
| canvas_channel: (IpcSender<CanvasMsg>, IpcReceiver<CanvasMsg>)) | |||
| -> IpcSender<CanvasMsg> { | |||
This comment has been minimized.
This comment has been minimized.
jdm
Dec 14, 2017
Member
Since all this method does is return the sender, we can make this code more efficient by only accepting the IpcReceiver argument and not returning anything.
| @@ -79,7 +79,8 @@ pub enum ScriptMsg { | |||
| ChangeRunningAnimationsState(AnimationState), | |||
| /// Requests that a new 2D canvas thread be created. (This is done in the constellation because | |||
| /// 2D canvases may use the GPU and we don't want to give untrusted content access to the GPU.) | |||
| CreateCanvasPaintThread(Size2D<i32>, IpcSender<IpcSender<CanvasMsg>>), | |||
| CreateCanvasPaintThread( | |||
| Size2D<i32>, IpcSender<IpcSender<CanvasMsg>>, (IpcSender<CanvasMsg>, IpcReceiver<CanvasMsg>)), | |||
This comment has been minimized.
This comment has been minimized.
jdm
Dec 14, 2017
Member
We should be able to remove the IpcSender<IpcSender> argument and only pass the IpcReceiver argument instead.
| @@ -130,9 +130,10 @@ impl CanvasRenderingContext2D { | |||
| -> CanvasRenderingContext2D { | |||
| debug!("Creating new canvas rendering context."); | |||
| let (sender, receiver) = ipc::channel().unwrap(); | |||
| let canvas_channel = ipc::channel::<CanvasMsg>().unwrap(); | |||
This comment has been minimized.
This comment has been minimized.
jdm
Dec 14, 2017
Member
We should be able to do let (sender, ipc_renderer) = ipc::channel::<CanvasMsg>().unwrap() and remove the let ipc_renderer and let (sender, receiver) lines entirely.
|
@jdm I have fixed them. Please check. |
|
@jdm Fixed. Please check. |
|
@bors-servo r+ |
|
|
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 -->
|
|
|
@jdm what happens?
|
|
@bors-servo retry
|
|
@emilio Seems it not work with retry? |
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 -->
|
|
|
|
@bors-servo retry |
|
|
|
|
|
|
@bors-servo retry |
|
|
|
|
Revert canvas IPC changes #19547 is responsible for the surge of new intermittent timeouts in canvas-related tests. There's nothing wrong with the change, so I suspect an underlying problem in ipc-channel instead. Fixes #19592. #19593. Fixes #19594. Fixes #19597. <!-- 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/19599) <!-- Reviewable:end -->
…s); r=asajeffrey servo/servo#19547 is responsible for the surge of new intermittent timeouts in canvas-related tests. There's nothing wrong with the change, so I suspect an underlying problem in ipc-channel instead. Fixes #19592. #19593. Fixes #19594. Fixes #19597. Source-Repo: https://github.com/servo/servo Source-Revision: 37fe9f29573e669ea9dd86ed6d9de0e43b3f746d --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 84f6a3819cb33421e270a2a8bbd6b62dcf0e9afb
…s); r=asajeffrey servo/servo#19547 is responsible for the surge of new intermittent timeouts in canvas-related tests. There's nothing wrong with the change, so I suspect an underlying problem in ipc-channel instead. Fixes #19592. #19593. Fixes #19594. Fixes #19597. Source-Repo: https://github.com/servo/servo Source-Revision: 37fe9f29573e669ea9dd86ed6d9de0e43b3f746d
…s); r=asajeffrey servo/servo#19547 is responsible for the surge of new intermittent timeouts in canvas-related tests. There's nothing wrong with the change, so I suspect an underlying problem in ipc-channel instead. Fixes #19592. #19593. Fixes #19594. Fixes #19597. Source-Repo: https://github.com/servo/servo Source-Revision: 37fe9f29573e669ea9dd86ed6d9de0e43b3f746d
…s); r=asajeffrey servo/servo#19547 is responsible for the surge of new intermittent timeouts in canvas-related tests. There's nothing wrong with the change, so I suspect an underlying problem in ipc-channel instead. Fixes #19592. #19593. Fixes #19594. Fixes #19597. Source-Repo: https://github.com/servo/servo Source-Revision: 37fe9f29573e669ea9dd86ed6d9de0e43b3f746d UltraBlame original commit: 6b1f9a0e13469a001e6ca2feda6a05153a4d9414
…s); r=asajeffrey servo/servo#19547 is responsible for the surge of new intermittent timeouts in canvas-related tests. There's nothing wrong with the change, so I suspect an underlying problem in ipc-channel instead. Fixes #19592. #19593. Fixes #19594. Fixes #19597. Source-Repo: https://github.com/servo/servo Source-Revision: 37fe9f29573e669ea9dd86ed6d9de0e43b3f746d UltraBlame original commit: 6b1f9a0e13469a001e6ca2feda6a05153a4d9414
…s); r=asajeffrey servo/servo#19547 is responsible for the surge of new intermittent timeouts in canvas-related tests. There's nothing wrong with the change, so I suspect an underlying problem in ipc-channel instead. Fixes #19592. #19593. Fixes #19594. Fixes #19597. Source-Repo: https://github.com/servo/servo Source-Revision: 37fe9f29573e669ea9dd86ed6d9de0e43b3f746d UltraBlame original commit: 6b1f9a0e13469a001e6ca2feda6a05153a4d9414
tigercosmos commentedDec 12, 2017
•
edited by SimonSapin
I am not sure if @jdm want this.
r? @jdm
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is