Bug 1611523 - Track the current layers id during the layer tree traversal in AsyncCompositionManager::ApplyAsyncContentTransformToTree(). r=hiro

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Botond Ballo 2020-01-25 00:23:34 +00:00
Родитель 7a190b94ba
Коммит a20a5d30fe
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -896,6 +896,8 @@ bool AsyncCompositionManager::ApplyAsyncContentTransformToTree(
Layer* aLayer, bool* aOutFoundRoot) {
bool appliedTransform = false;
std::stack<Maybe<ParentLayerIntRect>> stackDeferredClips;
std::stack<LayersId> layersIds;
layersIds.push(mCompositorBridge->RootLayerTreeId());
// Maps layers to their ClipParts. The parts are not stored individually
// on the layer, but during AlignFixedAndStickyLayers we need access to
@ -908,6 +910,10 @@ bool AsyncCompositionManager::ApplyAsyncContentTransformToTree(
ForEachNode<ForwardIterator>(
aLayer,
[&](Layer* layer) {
if (layer->AsRefLayer()) {
layersIds.push(layer->AsRefLayer()->GetReferentId());
}
stackDeferredClips.push(Maybe<ParentLayerIntRect>());
// If we encounter the async zoom container, find the corresponding
@ -1274,6 +1280,11 @@ bool AsyncCompositionManager::ApplyAsyncContentTransformToTree(
layers::ScrollbarLayerType::Thumb) {
ApplyAsyncTransformToScrollbar(layer);
}
if (layer->AsRefLayer()) {
MOZ_ASSERT(layersIds.size() > 1);
layersIds.pop();
}
});
return appliedTransform;