Back out b7f31a736800 for mochitest failures

--HG--
extra : rebase_source : 9f77f07db004fe11a20533c0ad017cef825a1a8b
This commit is contained in:
Benoit Girard 2012-10-15 16:57:43 -04:00
parent 6fc234d810
commit cfdf0a021b

View File

@ -131,20 +131,11 @@ ReusableTileStoreOGL::HarvestTiles(TiledThebesLayerOGL* aLayer,
if (x + w > validBounds.x + validBounds.width)
w = validBounds.x + validBounds.width - x;
// A tile will consume 256^2 of memory, don't retain small tile trims.
// This works around the display port sometimes creating a small 1 pixel wide
// tile because of rounding error.
if (w < 16)
continue;
for (int y = validBounds.y; y < validBounds.YMost();) {
int h = tileSize - aVideoMemoryTiledBuffer->GetTileStart(y);
if (y + h > validBounds.y + validBounds.height)
h = validBounds.y + validBounds.height - y;
if (h < 16)
continue;
// If the new valid region doesn't contain this tile region,
// harvest the tile.
nsIntRegion tileRegion;
@ -175,21 +166,6 @@ ReusableTileStoreOGL::HarvestTiles(TiledThebesLayerOGL* aLayer,
new ReusableTiledTextureOGL(removedTile, nsIntPoint(x, y), tileRegion,
tileSize, aOldResolution);
mTiles.AppendElement(reusedTile);
// Remove any tile that is superseded by this new tile.
// (same resolution, same area)
for (int i = 0; i < mTiles.Length() - 1; i++) {
// XXX Perhaps we should check the region instead of the origin
// so a partial tile doesn't replace a full older tile?
if (aVideoMemoryTiledBuffer->RoundDownToTileEdge(mTiles[i]->mTileOrigin.x) == aVideoMemoryTiledBuffer->RoundDownToTileEdge(x) &&
aVideoMemoryTiledBuffer->RoundDownToTileEdge(mTiles[i]->mTileOrigin.y) == aVideoMemoryTiledBuffer->RoundDownToTileEdge(y) &&
mTiles[i]->mResolution == aOldResolution) {
mContext->fDeleteTextures(1, &mTiles[i]->mTexture.mTextureHandle);
mTiles.RemoveElementAt(i);
// There should only be one similar tile
break;
}
}
}
#ifdef GFX_TILEDLAYER_PREF_WARNINGS
else