Bug 1129871 - Favor passing tiles by ref rather than copy part 2. r=BenWa

This commit is contained in:
Nicolas Silva 2015-02-14 12:14:59 +01:00
parent 0e7c4b0468
commit 4fea5323ad
2 changed files with 5 additions and 7 deletions

View File

@ -528,7 +528,7 @@ TiledLayerBuffer<Derived, Tile>::Update(const nsIntRegion& newValidRegion,
static_cast<unsigned>(index) < newRetainedTiles.Length(),
"index out of range");
Tile newTile = newRetainedTiles[index];
Tile& newTile = newRetainedTiles[index];
// Try to reuse a tile from the old retained tiles that had no partially
// valid content.
@ -550,8 +550,6 @@ TiledLayerBuffer<Derived, Tile>::Update(const nsIntRegion& newValidRegion,
#ifdef GFX_TILEDLAYER_PREF_WARNINGS
printf_stderr("Store Validate tile %i, %i -> %i\n", tileStartX, tileStartY, index);
#endif
newRetainedTiles[index] = newTile;
y += height;
}

View File

@ -36,11 +36,11 @@ public:
return TestTiledLayerTile(-1);
}
TestTiledLayerTile ValidateTile(TestTiledLayerTile aTile, const nsIntPoint& aTileOrigin, const nsIntRegion& aDirtyRect) {
return TestTiledLayerTile();
void ValidateTile(TestTiledLayerTile& aTile, const nsIntPoint& aTileOrigin, const nsIntRegion& aDirtyRect) {
aTile = TestTiledLayerTile();
}
void ReleaseTile(TestTiledLayerTile aTile)
void ReleaseTile(TestTiledLayerTile& aTile)
{
}
@ -57,7 +57,7 @@ public:
Update(aNewValidRegion, aPaintRegion);
}
void UnlockTile(TestTiledLayerTile aTile) {}
void UnlockTile(TestTiledLayerTile& aTile) {}
void PostValidate(const nsIntRegion& aPaintRegion) {}
};