Closed Bug 286236 Opened 19 years ago Closed 19 years ago

Cleanup nsImageWin::ConvertDDBtoDIB, remove BuildDIB

Categories

(Core Graveyard :: GFX: Win32, defect)

x86
Windows 2000
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: paper, Assigned: paper)

References

Details

Attachments

(1 file, 1 obsolete file)

1/2 the code in ConvertDDBtoDIB is redundant.

Currently, ConvertDDBtoDIB does these useless things:

- temporarily stores width & height of mBHead
- Deletes mBHead
- recalculates mBHead, mNumBytesPixel (via BuildDIB), mRowBytes, and mImageSize.
All of these will not change in value, since they are being recalculated based
on the same image info we had in init(), when we first calculated them all.

All this code can be removed, with the exception of mImageSize being recalculated.

Also, the header comments for this function in nsImageWin.h and nsImageWin.cpp
are incorrect.

I'll wait for the "Depends On" bugs to be checked in before attaching a patch.
Attached patch First attempt (obsolete) — Splinter Review
Attachment #179032 - Attachment is obsolete: true
Attachment #179797 - Flags: review?(emaijala)
Comment on attachment 179797 [details] [diff] [review]
Cleanup ConvertDDBtoDIB

Nice :)
Attachment #179797 - Flags: review?(emaijala) → review+
Attachment #179797 - Flags: superreview?(tor)
Attachment #179797 - Flags: superreview?(tor) → superreview+
Attachment #179797 - Flags: approval1.8b2?
Comment on attachment 179797 [details] [diff] [review]
Cleanup ConvertDDBtoDIB

a=asa
Attachment #179797 - Flags: approval1.8b2? → approval1.8b2+
Checking in gfx/src/windows/nsImageWin.cpp;
/cvsroot/mozilla/gfx/src/windows/nsImageWin.cpp,v  <--  nsImageWin.cpp
new revision: 3.147; previous revision: 3.146
done
Checking in gfx/src/windows/nsImageWin.h;
/cvsroot/mozilla/gfx/src/windows/nsImageWin.h,v  <--  nsImageWin.h
new revision: 3.64; previous revision: 3.63
done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: