зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
1273d512eb
Коммит
89a90da007
|
@ -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)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче