Closed Bug 379356 Opened 19 years ago Closed 15 years ago

Remove overhead from imgContainer for non-animated images

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: alfredkayser, Assigned: alfredkayser)

Details

Notes: 1. both mAnimationMode, mLoopCount can be moved to mAnim, saving 8 bytes for non animated images. 2. mFrames was for non animated images not an nsCOMarray, but a direct nsCOMptr. nsCOMarray adds 40 bytes of overhead for the 'single image' case, and an extra alloc/free. This will save in total 48 bytes per image (and a separate alloc).
Note, this is a follow up to bug 257197
Note2: Also the creation of mProperties can be made 'lazy': i.e. only created when needed. Currently only cur images do provide properties, and those are even very rare. So for all the png,jpg,gif,etc images properties is never needed.
Status: NEW → ASSIGNED
This is a mass change. Every comment has "assigned-to-new" in it. I didn't look through the bugs, so I'm sorry if I change a bug which shouldn't be changed. But I guess these bugs are just bugs that were once assigned and people forgot to change the Status back when unassigning.
Status: ASSIGNED → NEW
Assignee: nobody → alfredkayser
Status: NEW → ASSIGNED
With the changes in the image handling, and using a superclass, etc, this bug is no longer valid. The only space optimization that I see remaining is to move: 454 PRUint16 mAnimationMode; just before the packedbool:1 lines, to save 4 bytes from the whole structure, but that is not really worth the effort compared to the total size of that structure.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.