Bug 1503877 - Handle PauseComposition correctly with webrender enabled. r=kats

On android with webrender enabled, minimising the app results in an
assertion failure: CompositorBridgeParent::DidComposite asserts that
it should not be called with a webrender compositor.

This makes it so that that in CompositorBridgeParent::PauseComposition
we call NotifyPipelineRendered instead of DidComposite for webrender
compositors.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jamie Nicol 2018-11-02 09:00:45 +00:00
Родитель dda313d294
Коммит 9aa1aa7578
2 изменённых файлов: 5 добавлений и 2 удалений

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

@ -759,13 +759,15 @@ CompositorBridgeParent::PauseComposition()
if (!mPaused) {
mPaused = true;
TimeStamp now = TimeStamp::Now();
if (mCompositor) {
mCompositor->Pause();
DidComposite(now, now);
} else if (mWrBridge) {
mWrBridge->Pause();
NotifyPipelineRendered(mWrBridge->PipelineId(), mWrBridge->GetCurrentEpoch(),
now, now);
}
TimeStamp now = TimeStamp::Now();
DidComposite(now, now);
}
// if anyone's waiting to make sure that composition really got paused, tell them

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

@ -170,6 +170,7 @@ public:
void ExtractImageCompositeNotifications(nsTArray<ImageCompositeNotificationInfo>* aNotifications);
wr::Epoch GetCurrentEpoch() const { return mWrEpoch; }
wr::IdNamespace GetIdNamespace()
{
return mIdNamespace;