Closed Bug 410114 Opened 17 years ago Closed 17 years ago

Simplify nsTransform2D

Categories

(Core Graveyard :: GFX, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.9beta4

People

(Reporter: alfredkayser, Assigned: alfredkayser)

References

Details

Attachments

(1 file, 2 obsolete files)

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.
Attachment #294786 - Flags: review?(vladimir)
Assignee: nobody → alfredkayser
Keep the body of the methods in the .cpp file, and remove the unused methods. This version saves about 5K objectsize (on Windows).
Attachment #294786 - Attachment is obsolete: true
Attachment #304824 - Flags: review?
Attachment #294786 - Flags: review?(vladimir)
Attachment #304824 - Flags: review? → review?(vladimir)
Attachment #304824 - Flags: review?(vladimir) → review?(roc)
This is a kind of a followup from bug 291636 and bug 290885 where similar cleanups where done.
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.
Attachment #304824 - Attachment is obsolete: true
Attachment #304942 - Flags: review?(roc)
Attachment #304824 - Flags: review?(roc)
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
Depends on: 384057, 418104, 419000
Depends on: 419004
Version: unspecified → Trunk
Attachment #304942 - Flags: approval1.9?
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+
Keywords: checkin-needed
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
Closed: 17 years ago
Keywords: checkin-needed
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
Blocks: 376791
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: