mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 08:42:13 +00:00
Bug 1567319 - Discard payloads for no-op composites. r=bas
Differential Revision: https://phabricator.services.mozilla.com/D40569 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
a938574c60
commit
dfad7a59cc
@ -592,6 +592,12 @@ void LayerManagerComposite::UpdateAndRender() {
|
||||
// Composition requested, but nothing has changed. Don't do any work.
|
||||
mClonedLayerTreeProperties = LayerProperties::CloneFrom(GetRoot());
|
||||
mProfilerScreenshotGrabber.NotifyEmptyFrame();
|
||||
|
||||
// Discard the current payloads. These payloads did not require a composite
|
||||
// (they caused no changes to anything visible), so we don't want to measure
|
||||
// their latency.
|
||||
mPayload.Clear();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -987,6 +993,12 @@ bool LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion,
|
||||
if (actualBounds.IsEmpty()) {
|
||||
mProfilerScreenshotGrabber.NotifyEmptyFrame();
|
||||
mCompositor->GetWidget()->PostRender(&widgetContext);
|
||||
|
||||
// Discard the current payloads. These payloads did not require a composite
|
||||
// (they caused no changes to anything visible), so we don't want to measure
|
||||
// their latency.
|
||||
mPayload.Clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -313,6 +313,12 @@ void LayerManagerMLGPU::Composite() {
|
||||
if (!mSwapChain->ApplyNewInvalidRegion(std::move(mInvalidRegion),
|
||||
diagnosticRect)) {
|
||||
mProfilerScreenshotGrabber.NotifyEmptyFrame();
|
||||
|
||||
// Discard the current payloads. These payloads did not require a composite
|
||||
// (they caused no changes to anything visible), so we don't want to measure
|
||||
// their latency.
|
||||
mPayload.Clear();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user