mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
Bug 1160157 - skip content painting when the device is in device-reset/remove status. r=dvander
This commit is contained in:
parent
c4f9e0b615
commit
215ea62c6a
@ -304,12 +304,17 @@ ClientLayerManager::EndTransactionInternal(DrawPaintedLayerCallback aCallback,
|
||||
|
||||
GetRoot()->ComputeEffectiveTransforms(Matrix4x4());
|
||||
|
||||
if (gfxPrefs::AlwaysPaint() && XRE_IsContentProcess()) {
|
||||
TimeStamp start = TimeStamp::Now();
|
||||
root->RenderLayer();
|
||||
mLastPaintTime = TimeStamp::Now() - start;
|
||||
// Skip the painting if the device is in device-reset status.
|
||||
if (!gfxPlatform::GetPlatform()->DidRenderingDeviceReset()) {
|
||||
if (gfxPrefs::AlwaysPaint() && XRE_IsContentProcess()) {
|
||||
TimeStamp start = TimeStamp::Now();
|
||||
root->RenderLayer();
|
||||
mLastPaintTime = TimeStamp::Now() - start;
|
||||
} else {
|
||||
root->RenderLayer();
|
||||
}
|
||||
} else {
|
||||
root->RenderLayer();
|
||||
gfxCriticalNote << "LayerManager::EndTransaction skip RenderLayer().";
|
||||
}
|
||||
|
||||
if (!mRepeatTransaction && !GetRoot()->GetInvalidRegion().IsEmpty()) {
|
||||
@ -626,8 +631,12 @@ ClientLayerManager::ForwardTransaction(bool aScheduleComposite)
|
||||
{
|
||||
TimeStamp start = TimeStamp::Now();
|
||||
|
||||
if (mForwarder->GetSyncObject()) {
|
||||
mForwarder->GetSyncObject()->FinalizeFrame();
|
||||
// Skip the synchronization for buffer since we also skip the painting during
|
||||
// device-reset status.
|
||||
if (!gfxPlatform::GetPlatform()->DidRenderingDeviceReset()) {
|
||||
if (mForwarder->GetSyncObject()) {
|
||||
mForwarder->GetSyncObject()->FinalizeFrame();
|
||||
}
|
||||
}
|
||||
|
||||
mPhase = PHASE_FORWARD;
|
||||
|
Loading…
Reference in New Issue
Block a user