зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1382200 - Change implementation of the LayerMetricsWrapper IsScrollInfoLayer to use the metrics flag. r=botond
This also updates the WebRenderScrollDataWrapper function as it is meant to be semantically equivalent to the LayerMetricsWrapper one, which allows removal of a flag propagation. MozReview-Commit-ID: 9DBx4qbhq5A --HG-- extra : rebase_source : 3201d8a4bb7192ecdbe95983b605ac53b1a28c50
This commit is contained in:
Родитель
1147b9727c
Коммит
4dfe8eadc0
|
@ -178,13 +178,7 @@ public:
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(IsValid());
|
MOZ_ASSERT(IsValid());
|
||||||
|
|
||||||
// If we are not at the bottommost layer then it's
|
return Metrics().IsScrollInfoLayer();
|
||||||
// a stack of container layers all the way down to
|
|
||||||
// mLayer, which we can ignore. We only care about
|
|
||||||
// non-container descendants.
|
|
||||||
return Metrics().IsScrollable()
|
|
||||||
&& mLayer->AsContainerLayer()
|
|
||||||
&& !mLayer->GetFirstChild();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LayerMetricsWrapper GetParent() const
|
LayerMetricsWrapper GetParent() const
|
||||||
|
|
|
@ -37,7 +37,6 @@ WebRenderLayerScrollData::Initialize(WebRenderScrollData& aOwner,
|
||||||
mScrollIds.AppendElement(aOwner.AddMetadata(aLayer->GetScrollMetadata(i)));
|
mScrollIds.AppendElement(aOwner.AddMetadata(aLayer->GetScrollMetadata(i)));
|
||||||
}
|
}
|
||||||
|
|
||||||
mIsScrollInfoLayer = aLayer->AsContainerLayer() && !aLayer->GetFirstChild();
|
|
||||||
mTransform = aLayer->GetTransform();
|
mTransform = aLayer->GetTransform();
|
||||||
mTransformIsPerspective = aLayer->GetTransformIsPerspective();
|
mTransformIsPerspective = aLayer->GetTransformIsPerspective();
|
||||||
mEventRegions = aLayer->GetEventRegions();
|
mEventRegions = aLayer->GetEventRegions();
|
||||||
|
|
|
@ -52,7 +52,6 @@ public:
|
||||||
const ScrollMetadata& GetScrollMetadata(const WebRenderScrollData& aOwner,
|
const ScrollMetadata& GetScrollMetadata(const WebRenderScrollData& aOwner,
|
||||||
size_t aIndex) const;
|
size_t aIndex) const;
|
||||||
|
|
||||||
bool IsScrollInfoLayer() const { return mIsScrollInfoLayer; }
|
|
||||||
gfx::Matrix4x4 GetTransform() const { return mTransform; }
|
gfx::Matrix4x4 GetTransform() const { return mTransform; }
|
||||||
CSSTransformMatrix GetTransformTyped() const;
|
CSSTransformMatrix GetTransformTyped() const;
|
||||||
bool GetTransformIsPerspective() const { return mTransformIsPerspective; }
|
bool GetTransformIsPerspective() const { return mTransformIsPerspective; }
|
||||||
|
@ -84,7 +83,6 @@ private:
|
||||||
// Various data that we collect from the Layer in Initialize(), serialize
|
// Various data that we collect from the Layer in Initialize(), serialize
|
||||||
// over IPC, and use on the parent side in APZ.
|
// over IPC, and use on the parent side in APZ.
|
||||||
|
|
||||||
bool mIsScrollInfoLayer;
|
|
||||||
gfx::Matrix4x4 mTransform;
|
gfx::Matrix4x4 mTransform;
|
||||||
bool mTransformIsPerspective;
|
bool mTransformIsPerspective;
|
||||||
EventRegions mEventRegions;
|
EventRegions mEventRegions;
|
||||||
|
@ -188,7 +186,6 @@ struct ParamTraits<mozilla::layers::WebRenderLayerScrollData>
|
||||||
{
|
{
|
||||||
WriteParam(aMsg, aParam.mDescendantCount);
|
WriteParam(aMsg, aParam.mDescendantCount);
|
||||||
WriteParam(aMsg, aParam.mScrollIds);
|
WriteParam(aMsg, aParam.mScrollIds);
|
||||||
WriteParam(aMsg, aParam.mIsScrollInfoLayer);
|
|
||||||
WriteParam(aMsg, aParam.mTransform);
|
WriteParam(aMsg, aParam.mTransform);
|
||||||
WriteParam(aMsg, aParam.mTransformIsPerspective);
|
WriteParam(aMsg, aParam.mTransformIsPerspective);
|
||||||
WriteParam(aMsg, aParam.mEventRegions);
|
WriteParam(aMsg, aParam.mEventRegions);
|
||||||
|
@ -207,7 +204,6 @@ struct ParamTraits<mozilla::layers::WebRenderLayerScrollData>
|
||||||
{
|
{
|
||||||
return ReadParam(aMsg, aIter, &aResult->mDescendantCount)
|
return ReadParam(aMsg, aIter, &aResult->mDescendantCount)
|
||||||
&& ReadParam(aMsg, aIter, &aResult->mScrollIds)
|
&& ReadParam(aMsg, aIter, &aResult->mScrollIds)
|
||||||
&& ReadParam(aMsg, aIter, &aResult->mIsScrollInfoLayer)
|
|
||||||
&& ReadParam(aMsg, aIter, &aResult->mTransform)
|
&& ReadParam(aMsg, aIter, &aResult->mTransform)
|
||||||
&& ReadParam(aMsg, aIter, &aResult->mTransformIsPerspective)
|
&& ReadParam(aMsg, aIter, &aResult->mTransformIsPerspective)
|
||||||
&& ReadParam(aMsg, aIter, &aResult->mEventRegions)
|
&& ReadParam(aMsg, aIter, &aResult->mEventRegions)
|
||||||
|
|
|
@ -129,8 +129,7 @@ public:
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(IsValid());
|
MOZ_ASSERT(IsValid());
|
||||||
|
|
||||||
return Metrics().IsScrollable()
|
return Metrics().IsScrollInfoLayer();
|
||||||
&& mLayer->IsScrollInfoLayer();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WebRenderScrollDataWrapper GetLastChild() const
|
WebRenderScrollDataWrapper GetLastChild() const
|
||||||
|
|
Загрузка…
Ссылка в новой задаче