Bug 594253. Update mValidRegion by OR-ing with the visible region after repainting, instead of OR-ing with the redrawn region, since this leads to simpler region structures. r=cjones,a=blocking

This commit is contained in:
Robert O'Callahan 2011-01-16 23:38:45 +13:00
Родитель be174ce795
Коммит 7eb95710b4
2 изменённых файлов: 10 добавлений и 2 удалений

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

@ -423,7 +423,11 @@ protected:
}
aCallback(this, aContext, aRegionToDraw, aRegionToInvalidate,
aCallbackData);
mValidRegion.Or(mValidRegion, aRegionToDraw);
// Everything that's visible has been validated. Do this instead of
// OR-ing with aRegionToDraw, since that can lead to a very complex region
// here (OR doesn't automatically simplify to the simplest possible
// representation of a region.)
mValidRegion.Or(mValidRegion, mVisibleRegion);
}
Buffer mBuffer;

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

@ -555,7 +555,11 @@ ThebesLayerOGL::RenderLayer(int aPreviousFrameBuffer,
void* callbackData = mOGLManager->GetThebesLayerCallbackData();
callback(this, state.mContext, state.mRegionToDraw,
state.mRegionToInvalidate, callbackData);
mValidRegion.Or(mValidRegion, state.mRegionToDraw);
// Everything that's visible has been validated. Do this instead of
// OR-ing with aRegionToDraw, since that can lead to a very complex region
// here (OR doesn't automatically simplify to the simplest possible
// representation of a region.)
mValidRegion.Or(mValidRegion, mVisibleRegion);
}
DEBUG_GL_ERROR_CHECK(gl());