From 094d451696d09c33ddfd5ae5794b3c9757b1f9c0 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Tue, 14 Apr 2020 00:08:19 +0000 Subject: [PATCH] Bug 1622360 - Downgrade pageRootScs from RenderRootArray. r=jrmuizel Depends on D70603 Differential Revision: https://phabricator.services.mozilla.com/D70604 --HG-- extra : moz-landing-system : lando --- gfx/layers/wr/WebRenderCommandBuilder.cpp | 30 +++++++++-------------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/gfx/layers/wr/WebRenderCommandBuilder.cpp b/gfx/layers/wr/WebRenderCommandBuilder.cpp index f045de383707..19dda69727b9 100644 --- a/gfx/layers/wr/WebRenderCommandBuilder.cpp +++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp @@ -1533,28 +1533,22 @@ void WebRenderCommandBuilder::BuildWebRenderCommands( bool isTopLevelContent = presContext->Document()->IsTopLevelContentDocument(); - wr::RenderRootArray> pageRootScs; - for (auto renderRoot : wr::kRenderRoots) { - wr::StackingContextParams params; - // Just making this explicit - we assume that we do not want any - // filters traversing a RenderRoot boundary - if (renderRoot == wr::RenderRoot::Default) { - params.mFilters = std::move(aFilters.filters); - params.mFilterDatas = std::move(aFilters.filter_datas); - } - params.cache_tiles = isTopLevelContent; - params.clip = - wr::WrStackingContextClip::ClipChain(aBuilder.CurrentClipChainId()); - pageRootScs[renderRoot].emplace(rootScs[renderRoot], nullptr, nullptr, - nullptr, aBuilder, params); - } + wr::StackingContextParams params; + params.mFilters = std::move(aFilters.filters); + params.mFilterDatas = std::move(aFilters.filter_datas); + params.cache_tiles = isTopLevelContent; + params.clip = + wr::WrStackingContextClip::ClipChain(aBuilder.CurrentClipChainId()); + + StackingContextHelper pageRootSc(rootScs[wr::RenderRoot::Default], nullptr, + nullptr, nullptr, aBuilder, params); if (ShouldDumpDisplayList(aDisplayListBuilder)) { mBuilderDumpIndex = aBuilder.Dump(mDumpIndent + 1, Some(mBuilderDumpIndex), Nothing()); } - CreateWebRenderCommandsFromDisplayList( - aDisplayList, nullptr, aDisplayListBuilder, - *pageRootScs[wr::RenderRoot::Default], aBuilder, aResourceUpdates); + CreateWebRenderCommandsFromDisplayList(aDisplayList, nullptr, + aDisplayListBuilder, pageRootSc, + aBuilder, aResourceUpdates); } // Make a "root" layer data that has everything else as descendants