mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 20:22:00 +00:00
Bug 385894 - Kill old gfx code in nsWindowsShellService, patch by Ryan Jones <sciguyryan@gmail.com>, r=gavin
This commit is contained in:
parent
34b24eca93
commit
f2c7c9c6b9
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user