Bug 1160157 - skip content painting when the device is in device-reset/remove status. r=dvander

This commit is contained in:
JerryShih 2016-09-24 01:40:00 +02:00
parent c4f9e0b615
commit 215ea62c6a

View File

@ -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;