Bug 81361. Set mBytesPerPix for Mac based on mImagePixMap.pixelSize. r=lordpixel sr=tor

git-svn-id: svn://10.0.0.236/trunk@135424 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
paper%animecity.nu 2002-12-17 21:24:55 +00:00
parent 8fe791b706
commit a2bf62372f

View File

@ -224,7 +224,7 @@ nsImageMac::Init(PRInt32 aWidth, PRInt32 aHeight, PRInt32 aDepth, nsMaskRequirem
return NS_ERROR_FAILURE;
}
mBytesPerPixel = (aDepth < 8) ? 1 : aDepth / 8;
mBytesPerPixel = (mImagePixmap.pixelSize <= 8) ? 1 : mImagePixmap.pixelSize / 8;
mRowBytes = mImagePixmap.rowBytes & 0x3FFF; // we only set the top bit, but QuickDraw can use the top 2 bits