Bug 611389 - Minefield 64-bit crash of NVIDIA driver [@ nvwgf2umx.dll@0x56f71a ]. r=bsmedberg a=blocking-beta8+

This commit is contained in:
Makoto Kato
2010-11-17 14:50:39 +09:00
parent 3cb667a578
commit 0bcdf4678a
2 changed files with 5 additions and 6 deletions

View File

@@ -74,11 +74,8 @@ void
SharedDIBSurface::InitSurface(PRUint32 aWidth, PRUint32 aHeight,
bool aTransparent)
{
// Windows DIBs are bottom-to-top by default, so the stride is negative
// and the data is the beginning of the last row.
long stride = -long(aWidth * kBytesPerPixel);
long stride = long(aWidth * kBytesPerPixel);
unsigned char* data = reinterpret_cast<unsigned char*>(mSharedDIB.GetBits());
data -= (aHeight - 1) * stride;
gfxImageFormat format = aTransparent ? ImageFormatARGB32 : ImageFormatRGB24;