| author | Connor Brewster <cbrewster@mozilla.com> |
| Tue, 13 Aug 2019 22:03:16 +0000 | |
| changeset 487810 | 0c820a515e16953b3945ac670dac13099a568f6a |
| parent 487809 | 593868dee998ba4394f1a03c598564c83f27269d |
| child 487811 | 13618a1b49aa9d8f84570edbfdbf5c82f48abbfd |
| push id | 36430 |
| push user | dvarga@mozilla.com |
| push date | Wed, 14 Aug 2019 04:09:17 +0000 |
| treeherder | mozilla-central@d3deef805f92 [default view] [failures only] |
| perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
| reviewers | gw, nical |
| bugs | 1178765 |
| milestone | 70.0a1 |
| first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
| last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/gfx/wr/webrender/src/render_task.rs +++ b/gfx/wr/webrender/src/render_task.rs @@ -210,19 +210,23 @@ impl RenderTaskGraph { tasks: &[RenderTask], task_id: RenderTaskId, task_depth: i32, task_max_depths: &mut [i32], max_depth: &mut i32, ) { *max_depth = std::cmp::max(*max_depth, task_depth); - { - let task_max_depth = &mut task_max_depths[task_id.index as usize]; - *task_max_depth = std::cmp::max(*task_max_depth, task_depth); + let task_max_depth = &mut task_max_depths[task_id.index as usize]; + if task_depth > *task_max_depth { + *task_max_depth = task_depth; + } else { + // If this task has already been processed at a larger depth, + // there is no need to process it again. + return; } let task = &tasks[task_id.index as usize]; for child in &task.children { assign_task_depth( tasks, *child, task_depth + 1,