Bug 385894 - Kill old gfx code in nsWindowsShellService, patch by Ryan Jones <sciguyryan@gmail.com>, r=gavin

This commit is contained in:
philringnalda@gmail.com 2007-07-08 18:25:34 -07:00
parent 34b24eca93
commit f2c7c9c6b9

View File

@ -832,17 +832,11 @@ WriteBitmap(nsIFile* aFile, gfxIImageFrame* aImage)
if (written == sizeof(BITMAPFILEHEADER)) {
stream->Write((const char*)&bmi, sizeof(BITMAPINFOHEADER), &written);
if (written == sizeof(BITMAPINFOHEADER)) {
#ifndef MOZ_CAIRO_GFX
stream->Write((const char*)bits, length, &written);
if (written == length)
rv = NS_OK;
#else
// write out the image data backwards because the desktop won't
// show bitmaps with negative heights for top-to-bottom
PRUint32 i = length;
do {
i -= bpr;
stream->Write(((const char*)bits) + i, bpr, &written);
if (written == bpr) {
rv = NS_OK;
@ -851,7 +845,6 @@ WriteBitmap(nsIFile* aFile, gfxIImageFrame* aImage)
break;
}
} while (i != 0);
#endif
}
}