Title: [96705] trunk/Source/WebCore
- Revision
- 96705
- Author
- [email protected]
- Date
- 2011-10-05 08:13:00 -0700 (Wed, 05 Oct 2011)
Log Message
Shrink FontDescription.
https://bugs.webkit.org/show_bug.cgi?id=69426
Reviewed by Nikolas Zimmermann.
Pack FontDescription's members in a bitfield, effectively shrinking
the class by two CPU-words. This reduces memory consumption by ~1 MB
on 64-bit when loading the full HTML5 spec.
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::orientation):
(WebCore::FontDescription::textOrientation):
(WebCore::FontDescription::widthVariant):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (96704 => 96705)
--- trunk/Source/WebCore/ChangeLog 2011-10-05 14:51:58 UTC (rev 96704)
+++ trunk/Source/WebCore/ChangeLog 2011-10-05 15:13:00 UTC (rev 96705)
@@ -1,3 +1,19 @@
+2011-10-05 Andreas Kling <[email protected]>
+
+ Shrink FontDescription.
+ https://bugs.webkit.org/show_bug.cgi?id=69426
+
+ Reviewed by Nikolas Zimmermann.
+
+ Pack FontDescription's members in a bitfield, effectively shrinking
+ the class by two CPU-words. This reduces memory consumption by ~1 MB
+ on 64-bit when loading the full HTML5 spec.
+
+ * platform/graphics/FontDescription.h:
+ (WebCore::FontDescription::orientation):
+ (WebCore::FontDescription::textOrientation):
+ (WebCore::FontDescription::widthVariant):
+
2011-10-05 Vsevolod Vlasov <[email protected]>
Web Inspector: Add support for search in script content.
Modified: trunk/Source/WebCore/platform/graphics/FontDescription.h (96704 => 96705)
--- trunk/Source/WebCore/platform/graphics/FontDescription.h 2011-10-05 14:51:58 UTC (rev 96704)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.h 2011-10-05 15:13:00 UTC (rev 96705)
@@ -119,9 +119,9 @@
FontTraitsMask traitsMask() const;
bool isSpecifiedFont() const { return m_isSpecifiedFont; }
- FontOrientation orientation() const { return m_orientation; }
- TextOrientation textOrientation() const { return m_textOrientation; }
- FontWidthVariant widthVariant() const { return m_widthVariant; }
+ FontOrientation orientation() const { return static_cast<FontOrientation>(m_orientation); }
+ TextOrientation textOrientation() const { return static_cast<TextOrientation>(m_textOrientation); }
+ FontWidthVariant widthVariant() const { return static_cast<FontWidthVariant>(m_widthVariant); }
FontFeatureSettings* featureSettings() const { return m_featureSettings.get(); }
FontDescription makeNormalFeatureSettings() const;
@@ -153,18 +153,17 @@
private:
FontFamily m_familyList; // The list of font families to be used.
+ RefPtr<FontFeatureSettings> m_featureSettings;
float m_specifiedSize; // Specified CSS value. Independent of rendering issues such as integer
// rounding, minimum font sizes, and zooming.
float m_computedSize; // Computed size adjusted for the minimum font size and the zoom factor.
- FontOrientation m_orientation; // Whether the font is rendering on a horizontal line or a vertical line.
- TextOrientation m_textOrientation; // Only used by vertical text. Determines the default orientation for non-ideograph glyphs.
+ unsigned m_orientation : 1; // FontOrientation - Whether the font is rendering on a horizontal line or a vertical line.
+ unsigned m_textOrientation : 1; // TextOrientation - Only used by vertical text. Determines the default orientation for non-ideograph glyphs.
- FontWidthVariant m_widthVariant;
+ unsigned m_widthVariant : 2; // FontWidthVariant
- RefPtr<FontFeatureSettings> m_featureSettings;
-
unsigned m_italic : 1; // FontItalic
unsigned m_smallCaps : 1; // FontSmallCaps
bool m_isAbsoluteSize : 1; // Whether or not CSS specified an explicit size
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes