Auto merge of #5572 - laumann:remove-unnecessary-buffer-sends, r=glennw

Some debugging reveals that the send_back_unused_buffers() quite often sends empty vectors back to the paint task. This still incurs a communication overhead though. Instead check that the there actually are buffers to send back.
This commit is contained in:
bors-servo 2015-04-09 20:28:31 -05:00
commit 80851f7055
3 changed files with 11 additions and 13 deletions

View file

@ -557,9 +557,8 @@ impl LayoutTask {
{
let mut rw_data = self.lock_rw_data(possibly_locked_rw_data);
match (&mut *rw_data).parallel_traversal {
None => {}
Some(ref mut traversal) => traversal.shutdown(),
if let Some(ref mut traversal) = (&mut *rw_data).parallel_traversal {
traversal.shutdown()
}
LayoutTask::return_rw_data(possibly_locked_rw_data, rw_data);
}