Bug 1009184 - Explicitly clear the valid region instead of attempting to paint an empty region. r=BenWa

This commit is contained in:
Kartikaya Gupta 2014-05-13 14:36:33 -04:00
parent a053a3facc
commit 0a15196a06
2 changed files with 14 additions and 3 deletions

View File

@ -123,6 +123,19 @@ public:
const nsIntRegion& GetPaintedRegion() const { return mPaintedRegion; }
void ClearPaintedRegion() { mPaintedRegion.SetEmpty(); }
void ResetPaintedAndValidState() {
mPaintedRegion.SetEmpty();
mValidRegion.SetEmpty();
mRetainedWidth = 0;
mRetainedHeight = 0;
for (size_t i = 0; i < mRetainedTiles.Length(); i++) {
if (!IsPlaceholder(mRetainedTiles[i])) {
AsDerived().ReleaseTile(mRetainedTiles[i]);
}
}
mRetainedTiles.Clear();
}
// Given a position i, this function returns the position inside the current tile.
int GetTileStart(int i, int aTileLength) const {
return (i >= 0) ? (i % aTileLength)

View File

@ -393,9 +393,7 @@ ClientTiledThebesLayer::RenderLayer()
// Clear the low precision tiled buffer
updatedLowPrecision = true;
mLowPrecisionValidRegion.SetEmpty();
mContentClient->mLowPrecisionTiledBuffer.PaintThebes(mLowPrecisionValidRegion,
mLowPrecisionValidRegion,
callback, data);
mContentClient->mLowPrecisionTiledBuffer.ResetPaintedAndValidState();
}
// We send a Painted callback if we clear the valid region of the low