mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 854421 - Part 2: If we cancel a composite when going into test mode, fire the DidComposite event anway in case someone is waiting on it. r=nical
This commit is contained in:
parent
b61c593824
commit
9c37506034
@ -418,6 +418,7 @@ CompositorParent::PauseComposition()
|
||||
mPaused = true;
|
||||
|
||||
mCompositor->Pause();
|
||||
DidComposite();
|
||||
}
|
||||
|
||||
// if anyone's waiting to make sure that composition really got paused, tell them
|
||||
@ -627,6 +628,7 @@ CompositorParent::CompositeToTarget(DrawTarget* aTarget, const nsIntRect* aRect)
|
||||
mLastCompose = TimeStamp::Now();
|
||||
|
||||
if (!CanComposite()) {
|
||||
DidComposite();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -783,6 +785,9 @@ CompositorParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
|
||||
}
|
||||
if (aScheduleComposite) {
|
||||
ScheduleComposition();
|
||||
if (mPaused) {
|
||||
DidComposite();
|
||||
}
|
||||
// When testing we synchronously update the shadow tree with the animated
|
||||
// values to avoid race conditions when calling GetAnimationTransform etc.
|
||||
// (since the above SetShadowProperties will remove animation effects).
|
||||
@ -795,6 +800,8 @@ CompositorParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
|
||||
mCompositionManager->TransformShadowTree(mTestTime);
|
||||
if (!requestNextFrame) {
|
||||
CancelCurrentCompositeTask();
|
||||
// Pretend we composited in case someone is wating for this event.
|
||||
DidComposite();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -824,6 +831,8 @@ CompositorParent::SetTestSampleTime(LayerTransactionParent* aLayerTree,
|
||||
bool requestNextFrame = mCompositionManager->TransformShadowTree(aTime);
|
||||
if (!requestNextFrame) {
|
||||
CancelCurrentCompositeTask();
|
||||
// Pretend we composited in case someone is wating for this event.
|
||||
DidComposite();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user