Closed
Bug 69313
Opened 24 years ago
Closed 23 years ago
Savings fom extra data/computations related to GetBoundingMetrics
Categories
(Core :: MathML, defect)
Core
MathML
Tracking
()
RESOLVED
FIXED
mozilla0.9
People
(Reporter: rbs, Assigned: rbs)
Details
(Keywords: memory-footprint, perf)
Attachments
(2 files)
19.32 KB,
patch
|
Details | Diff | Splinter Review | |
20.07 KB,
patch
|
Details | Diff | Splinter Review |
The nsBoundingMetrics struct, defined in nsIRenderingContext.h, includes the following members: nscoord supItalicCorrection, subItalicCorrection, leftItalicCorrection; They were not computed correctly (see below), and the XP code in layout/mathml is not making any use of them. Instead, some simple estimations are proving quite satsifactory at the XP level. As a result, these members have become useless and can be removed for performance and footprint reasons. // get italic correction This is returning the angle, not the final value. Even that angle is incorrect on X-based systems. 2066 XFontStruct *fontInfo = (XFontStruct *) GDK_FONT_XFONT (mFont); 2067 unsigned long pr = 0; 2068 if (::XGetFontProperty(fontInfo, XA_ITALIC_ANGLE, &pr)) { 2069 aBoundingMetrics.subItalicCorrection = (gint) pr; 2070 aBoundingMetrics.supItalicCorrection = (gint) pr; 2071 } gfx/src/xprint/nsFontMetricsXP.{h,cpp} gfx/src/xprint/nsFontMetricsGTK.{h,cpp} GetItalicSlope() is also not necessary anymore gfx/src/xprint/nsFontMetricsWin.{h,cpp}
Guys, want to give me a quick r/sr on this - should be a no-brainer.
Target Milestone: --- → mozilla0.9
Comment 4•23 years ago
|
||
sr=erik for 2nd patch
Comment 5•23 years ago
|
||
r=bstell@netscape.com
Thanks guys. Checked-in. Resolving as FIXED.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•