зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1552608 - Define AsyncCompositionManager::mFixedLayerMargins and its getter/setter on all platforms. r=tnikkel
It's still only used on Android, but keeping it and all code that interacts with it inside an #ifdef is too much trouble for a tiny amount of space saving. Differential Revision: https://phabricator.services.mozilla.com/D48369 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
be2e7568aa
Коммит
1273d512eb
|
@ -1226,10 +1226,7 @@ bool AsyncCompositionManager::ApplyAsyncContentTransformToTree(
|
|||
!layer->GetParent()->GetIsFixedPosition() &&
|
||||
IsFixedToZoomContainer(layer)) {
|
||||
LayerToParentLayerMatrix4x4 emptyTransform;
|
||||
ScreenMargin marginsForFixedLayer;
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
marginsForFixedLayer = GetFixedLayerMargins();
|
||||
#endif
|
||||
ScreenMargin marginsForFixedLayer = GetFixedLayerMargins();
|
||||
AdjustFixedOrStickyLayer(zoomContainer, layer,
|
||||
sampler->GetGuid(*zoomedMetrics).mScrollId,
|
||||
emptyTransform, emptyTransform,
|
||||
|
@ -1473,7 +1470,6 @@ bool AsyncCompositionManager::TransformShadowTree(
|
|||
return wantNextFrame;
|
||||
}
|
||||
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
void AsyncCompositionManager::SetFixedLayerMargins(ScreenIntCoord aTop,
|
||||
ScreenIntCoord aBottom) {
|
||||
mFixedLayerMargins.top = aTop;
|
||||
|
@ -1487,7 +1483,6 @@ ScreenMargin AsyncCompositionManager::GetFixedLayerMargins() const {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
||||
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -234,11 +234,14 @@ class AsyncCompositionManager final {
|
|||
|
||||
MOZ_NON_OWNING_REF CompositorBridgeParent* mCompositorBridge;
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
public:
|
||||
void SetFixedLayerMargins(ScreenIntCoord aTop, ScreenIntCoord aBottom);
|
||||
ScreenMargin GetFixedLayerMargins() const;
|
||||
|
||||
private:
|
||||
ScreenMargin mFixedLayerMargins;
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
private:
|
||||
// This calculates whether frame metrics should be sent to Java.
|
||||
bool FrameMetricsHaveUpdated(const FrameMetrics& aMetrics);
|
||||
|
@ -249,7 +252,6 @@ class AsyncCompositionManager final {
|
|||
// then we need to reposition the gecko scrollbar to deal with the
|
||||
// dynamic toolbar shifting content around.
|
||||
ScrollableLayerGuid::ViewID mRootScrollableId;
|
||||
ScreenMargin mFixedLayerMargins;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче