зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1521644 - Add a layer property that indicates async zoom container layers. r=mattwoodrow
MozReview-Commit-ID: 6qkFXhRDFs Differential Revision: https://phabricator.services.mozilla.com/D17174 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
764c20081e
Коммит
5c1e861efd
|
@ -179,6 +179,14 @@ class SimpleLayerAttributes final {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool SetIsAsyncZoomContainer(const Maybe<FrameMetrics::ViewID>& aViewId) {
|
||||
if (mIsAsyncZoomContainerForViewId == aViewId) {
|
||||
return false;
|
||||
}
|
||||
mIsAsyncZoomContainerForViewId = aViewId;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SetScrollbarData(const ScrollbarData& aScrollbarData) {
|
||||
if (mScrollbarData == aScrollbarData) {
|
||||
return false;
|
||||
|
@ -292,6 +300,10 @@ class SimpleLayerAttributes final {
|
|||
|
||||
bool IsFixedPosition() const { return mIsFixedPosition; }
|
||||
|
||||
Maybe<FrameMetrics::ViewID> IsAsyncZoomContainer() const {
|
||||
return mIsAsyncZoomContainerForViewId;
|
||||
}
|
||||
|
||||
const ScrollbarData& GetScrollbarData() const { return mScrollbarData; }
|
||||
|
||||
gfx::CompositionOp GetMixBlendMode() const { return mMixBlendMode; }
|
||||
|
@ -341,6 +353,8 @@ class SimpleLayerAttributes final {
|
|||
mContentFlags == aOther.mContentFlags &&
|
||||
mOpacity == aOther.mOpacity &&
|
||||
mIsFixedPosition == aOther.mIsFixedPosition &&
|
||||
mIsAsyncZoomContainerForViewId ==
|
||||
aOther.mIsAsyncZoomContainerForViewId &&
|
||||
mScrollbarData == aOther.mScrollbarData &&
|
||||
mMixBlendMode == aOther.mMixBlendMode &&
|
||||
mForceIsolatedGroup == aOther.mForceIsolatedGroup;
|
||||
|
@ -355,6 +369,7 @@ class SimpleLayerAttributes final {
|
|||
uint32_t mContentFlags;
|
||||
float mOpacity;
|
||||
bool mIsFixedPosition;
|
||||
Maybe<FrameMetrics::ViewID> mIsAsyncZoomContainerForViewId;
|
||||
ScrollbarData mScrollbarData;
|
||||
gfx::CompositionOp mMixBlendMode;
|
||||
bool mForceIsolatedGroup;
|
||||
|
|
|
@ -1718,6 +1718,11 @@ void Layer::PrintInfo(std::stringstream& aStream, const char* aPrefix) {
|
|||
if (Is3DContextLeaf()) {
|
||||
aStream << " [is3DContextLeaf]";
|
||||
}
|
||||
if (Maybe<FrameMetrics::ViewID> viewId = IsAsyncZoomContainer()) {
|
||||
aStream << nsPrintfCString(" [asyncZoomContainer scrollId=%" PRIu64 "]",
|
||||
*viewId)
|
||||
.get();
|
||||
}
|
||||
if (IsScrollbarContainer()) {
|
||||
aStream << " [scrollbar]";
|
||||
}
|
||||
|
|
|
@ -1216,6 +1216,14 @@ class Layer {
|
|||
}
|
||||
}
|
||||
|
||||
void SetIsAsyncZoomContainer(const Maybe<FrameMetrics::ViewID>& aViewId) {
|
||||
if (mSimpleAttrs.SetIsAsyncZoomContainer(aViewId)) {
|
||||
MOZ_LAYERS_LOG_IF_SHADOWABLE(
|
||||
this, ("Layer::Mutated(%p) IsAsyncZoomContainer", this));
|
||||
MutatedSimple();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* CONSTRUCTION PHASE ONLY
|
||||
* This flag is true when the transform on the layer is a perspective
|
||||
|
@ -1359,6 +1367,9 @@ class Layer {
|
|||
virtual float GetPostXScale() const { return mSimpleAttrs.GetPostXScale(); }
|
||||
virtual float GetPostYScale() const { return mSimpleAttrs.GetPostYScale(); }
|
||||
bool GetIsFixedPosition() { return mSimpleAttrs.IsFixedPosition(); }
|
||||
Maybe<FrameMetrics::ViewID> IsAsyncZoomContainer() {
|
||||
return mSimpleAttrs.IsAsyncZoomContainer();
|
||||
}
|
||||
bool GetTransformIsPerspective() const {
|
||||
return mSimpleAttrs.GetTransformIsPerspective();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче