mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 09:19:28 +00:00
Bug 741984 - Prevent tiled texture upload from going into an infinite loop. r=Cwiiis
This commit is contained in:
parent
41f8705a3e
commit
23b8ec9661
@ -928,11 +928,15 @@ TiledTextureImage::DirectUpdate(gfxASurface* aSurf, const nsIntRegion& aRegion,
|
||||
result &= mImages[mCurrentImage]->
|
||||
DirectUpdate(aSurf, tileRegion, aFrom + nsIntPoint(xPos, yPos));
|
||||
|
||||
if (mCurrentImage == mImages.Length() - 1) {
|
||||
// We know we're done, but we still need to ensure that the callback
|
||||
// gets called (e.g. to update the uploaded region).
|
||||
NextTile();
|
||||
break;
|
||||
}
|
||||
// Override a callback cancelling iteration if the texture wasn't valid.
|
||||
// We need to force the update in that situation, or we may end up
|
||||
// showing invalid/out-of-date texture data.
|
||||
if (mCurrentImage == mImages.Length() - 1)
|
||||
break;
|
||||
} while (NextTile() || (mTextureState != Valid));
|
||||
mCurrentImage = oldCurrentImage;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user