Bug 1770619 - In the content-side WebRenderScrollData dump, include the display item from which a WebRenderLayerScrollData node was created. r=tnikkel

Differential Revision: https://phabricator.services.mozilla.com/D147009
This commit is contained in:
Botond Ballo 2022-05-28 21:55:54 +00:00
Родитель a3d16af2f2
Коммит bc6735e778
2 изменённых файлов: 17 добавлений и 0 удалений

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

@ -49,6 +49,10 @@ void WebRenderLayerScrollData::Initialize(
-1); // Don't allow re-setting an already set value
mDescendantCount = aDescendantCount;
#if defined(DEBUG) || defined(MOZ_DUMP_PAINTING)
mInitializedFrom = aItem;
#endif
MOZ_ASSERT(aItem);
aItem->UpdateScrollData(&aOwner, this);
@ -157,6 +161,11 @@ void WebRenderLayerScrollData::Dump(std::ostream& aOut,
const WebRenderScrollData& aOwner) const {
aOut << "WebRenderLayerScrollData(" << this
<< "), descendantCount=" << mDescendantCount;
#if defined(DEBUG) || defined(MOZ_DUMP_PAINTING)
if (mInitializedFrom) {
aOut << ", item=" << (void*)mInitializedFrom;
}
#endif
for (size_t i = 0; i < mScrollIds.Length(); i++) {
aOut << ", metadata" << i << "=" << aOwner.GetScrollMetadata(mScrollIds[i]);
}
@ -377,6 +386,8 @@ void ParamTraits<mozilla::layers::WebRenderLayerScrollData>::Write(
WriteParam(aWriter, aParam.mStickyPositionAnimationId);
WriteParam(aWriter, aParam.mZoomAnimationId);
WriteParam(aWriter, aParam.mAsyncZoomContainerId);
// Do not write |mInitializedFrom|, the pointer wouldn't be valid
// on the compositor side.
}
bool ParamTraits<mozilla::layers::WebRenderLayerScrollData>::Read(

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

@ -221,6 +221,12 @@ class WebRenderLayerScrollData final {
Maybe<uint64_t> mStickyPositionAnimationId;
Maybe<uint64_t> mZoomAnimationId;
Maybe<ViewID> mAsyncZoomContainerId;
#if defined(DEBUG) || defined(MOZ_DUMP_PAINTING)
// The display item for which this layer was built.
// This is only set on the content side.
nsDisplayItem* mInitializedFrom = nullptr;
#endif
};
// Data needed by APZ, for the whole layer tree. One instance of this class