Bug 1552608 - Factor out a helper CompositorBridgeParent::SetFixedLayerMargins(). r=tnikkel

Differential Revision: https://phabricator.services.mozilla.com/D48370

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Botond Ballo 2019-10-07 20:43:23 +00:00
Родитель 1273d512eb
Коммит 89a90da007
3 изменённых файлов: 12 добавлений и 7 удалений

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

@ -1436,6 +1436,16 @@ void CompositorBridgeParent::SetConfirmedTargetAPZC(
mApzUpdater->RunOnControllerThread(selector, task.forget());
}
void CompositorBridgeParent::SetFixedLayerMargins(ScreenIntCoord aTop,
ScreenIntCoord aBottom) {
if (AsyncCompositionManager* manager = GetCompositionManager(nullptr)) {
manager->SetFixedLayerMargins(aTop, aBottom);
}
Invalidate();
ScheduleComposition();
}
void CompositorBridgeParent::InitializeLayerManager(
const nsTArray<LayersBackend>& aBackendHints) {
NS_ASSERTION(!mLayerManager, "Already initialised mLayerManager");

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

@ -394,6 +394,7 @@ class CompositorBridgeParent final : public CompositorBridgeParentBase,
LayerTransactionParent* aLayerTree) override {
return mCompositionManager;
}
void SetFixedLayerMargins(ScreenIntCoord aTop, ScreenIntCoord aBottom);
PTextureParent* AllocPTextureParent(
const SurfaceDescriptor& aSharedData, const ReadLockDescriptor& aReadLock,

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

@ -119,13 +119,7 @@ mozilla::ipc::IPCResult UiCompositorControllerParent::RecvFixedBottomOffset(
CompositorBridgeParent::GetCompositorBridgeParentFromLayersId(
mRootLayerTreeId);
if (parent) {
AsyncCompositionManager* manager = parent->GetCompositionManager(nullptr);
if (manager) {
manager->SetFixedLayerMargins(0, aOffset);
}
parent->Invalidate();
parent->ScheduleComposition();
parent->SetFixedLayerMargins(0, aOffset);
}
#endif // defined(MOZ_WIDGET_ANDROID)