Closed
Bug 397734
Opened 17 years ago
Closed 17 years ago
Reduce memory usage for storing glyph extents
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
People
(Reporter: roc, Assigned: roc)
References
Details
(Keywords: memory-footprint, regression)
Attachments
(1 file)
19.77 KB,
patch
|
vlad
:
review+
pavlov
:
approval1.9+
|
Details | Diff | Splinter Review |
See bug 96041. This bug is for dealing with the space regression. There are two parts to the patch: 1) Resurrect NEED_BOUNDING_BOX flag so that only text frames and SVG request bounding boxes and hence trigger glyph extents acquisition. 2) Optimize storage of widths for simple glyphs. We use an array of pointers to arrays of PRUint16, with an encoding optimization for blocks that contain just a single glyph's width. There's also some useful DEBUG-only metering code here.
Attachment #282510 -
Flags: review?(vladimir)
Assignee | ||
Updated•17 years ago
|
Flags: blocking1.9?
Updated•17 years ago
|
Keywords: footprint,
regression
Attachment #282510 -
Flags: review?(vladimir) → review+
Assignee | ||
Updated•17 years ago
|
Attachment #282510 -
Flags: approval1.9?
Updated•17 years ago
|
Attachment #282510 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 1•17 years ago
|
||
checked in. let's watch Talos
Assignee | ||
Comment 2•17 years ago
|
||
Looks like this fixed the memory problems, but it caused a regression related to tooltips or something, so I backed it out.
Assignee | ||
Comment 3•17 years ago
|
||
Nothing more than a tragic failure to initialize newBlock: newBlock = new PRUint16[BLOCK_SIZE]; if (!newBlock) return; newBlock[GetGlyphOffset(bits)] = GetWidth(bits); I'm adding this and relanding: PRUint32 i; for (i = 0; i < BLOCK_SIZE; ++i) { newBlock[i] = INVALID_WIDTH; }
Comment 4•17 years ago
|
||
Comment on attachment 282510 [details] [diff] [review] fix >+ enum { BLOCK_SIZE_BITS = 7, BLOCK_SIZE = 1 << BLOCK_SIZE_BITS }; // 128-glyph blocks >+ >+ class GlyphWidths { Nit: the above enum is never used outside this class...
Flags: blocking1.9? → blocking1.9+
Assignee | ||
Comment 5•17 years ago
|
||
I relanded this already.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•