Commit b5f999f5 authored by Connor Brewster's avatar Connor Brewster
Browse files

Bug 1178765 - Part 5: Add optimization to render task depth assignment r=gw,nical

Fixes an issue when backdrop-filter is used many time on a page where we would
spend a large amount of time reevaluating render tasks when assigning task depths.

Differential Revision: https://phabricator.services.mozilla.com/D41252

--HG--
extra : moz-landing-system : lando
parent ec29ea95
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -215,9 +215,13 @@ impl RenderTaskGraph {
        ) {
            *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);
            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];