Remove 'type' from nsTransform2D, and remove all 'if'/'switch' branching. This reduces size of nsTransform2D: datasize 16 bytes instead of 20. (although type is short, the class is 4byte padded). codesize: as many functions are now much simplier, and can be inlined in lot of cases.
Keep the body of the methods in the .cpp file, and remove the unused methods. This version saves about 5K objectsize (on Windows).
Attachment #304824 - Flags: review? → review?(vladimir)
Attachment #304824 - Flags: review?(vladimir) → review?(roc)
ScaleXCoords and ScaleYCoords are not used (gfx/src/windows and gfx/src/mac are not built). SetToIdentity is not used (the code in nsBulletFrame is #if 0'ed out and should just be removed). Ditto SetToScale. gfx/src/photon isn't built, so GetX/YTranslation(Coord) can be removed (no point in keeping them just for debug printf in SVG). I haven't checked all the others ... basically just take a closer look at the users, most of them aren't real.
Created bug 419000 to remove the old debug code from SVG.
Created bug 419004 to remove /gfx/src/beos. Bug 384057 is for the removal of /gfx/src/photon. Bug 418104 is for the removal of /gfx/src/windows
Comment on attachment 304942 [details] [diff] [review] V3: Much more cleanup, including removal of "#if 0" from nsBulletFrame a1.9+=damons
Attachment #304942 - Flags: approval1.9? → approval1.9+
Checking in gfx/public/nsTransform2D.h; /cvsroot/mozilla/gfx/public/nsTransform2D.h,v <-- nsTransform2D.h new revision: 1.12; previous revision: 1.11 done Checking in gfx/src/nsTransform2D.cpp; /cvsroot/mozilla/gfx/src/nsTransform2D.cpp,v <-- nsTransform2D.cpp new revision: 3.19; previous revision: 3.18 done Checking in layout/generic/nsBulletFrame.cpp; /cvsroot/mozilla/layout/generic/nsBulletFrame.cpp,v <-- nsBulletFrame.cpp new revision: 1.169; previous revision: 1.168 done
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta4
Thanks. 1200 code bytes saved: libxul.so Total: -1200 (+52/-1252) Code: -1195 (+0/+0) Data: -5 (+52/-1252)
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.