зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1490393 - Extract a helper method on StackingContextHelper to get the deferred transform matrix. r=mstange
Depends on D8108 Differential Revision: https://phabricator.services.mozilla.com/D8109 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
2db495b01c
Коммит
12f8d1ed88
|
@ -95,5 +95,15 @@ StackingContextHelper::GetDeferredTransformItem() const
|
|||
return mDeferredTransformItem;
|
||||
}
|
||||
|
||||
Maybe<gfx::Matrix4x4>
|
||||
StackingContextHelper::GetDeferredTransformMatrix() const
|
||||
{
|
||||
if (mDeferredTransformItem) {
|
||||
return Some((*mDeferredTransformItem)->GetTransform().GetMatrix());
|
||||
} else {
|
||||
return Nothing();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -63,6 +63,7 @@ public:
|
|||
}
|
||||
|
||||
const Maybe<nsDisplayTransform*>& GetDeferredTransformItem() const;
|
||||
Maybe<gfx::Matrix4x4> GetDeferredTransformMatrix() const;
|
||||
|
||||
bool AffectsClipPositioning() const { return mAffectsClipPositioning; }
|
||||
Maybe<wr::WrClipId> ReferenceFrameId() const { return mReferenceFrameId; }
|
||||
|
|
|
@ -1511,14 +1511,14 @@ WebRenderCommandBuilder::CreateWebRenderCommandsFromDisplayList(nsDisplayList* a
|
|||
// stopAtAsr and |item|'s ASR in the ASR tree).
|
||||
mLayerScrollData.emplace_back();
|
||||
mLayerScrollData.back().Initialize(mManager->GetScrollData(), *deferred,
|
||||
descendants, stopAtAsr, Some((*deferred)->GetTransform().GetMatrix()));
|
||||
descendants, stopAtAsr, aSc.GetDeferredTransformMatrix());
|
||||
} else {
|
||||
// This is the "simple" case where we don't need to create two
|
||||
// WebRenderLayerScrollData items; we can just create one that also
|
||||
// holds the deferred transform matrix, if any.
|
||||
mLayerScrollData.emplace_back();
|
||||
mLayerScrollData.back().Initialize(mManager->GetScrollData(), item,
|
||||
descendants, stopAtAsr, deferred ? Some((*deferred)->GetTransform().GetMatrix()) : Nothing());
|
||||
descendants, stopAtAsr, aSc.GetDeferredTransformMatrix());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче