Title: [117868] trunk/Source/WebCore
Revision
117868
Author
[email protected]
Date
2012-05-21 18:53:10 -0700 (Mon, 21 May 2012)

Log Message

Shrink FontDescription object size
https://bugs.webkit.org/show_bug.cgi?id=86950

Reviewed by Alexey Proskuryakov.

Reduce object size of FontDescription by 8 bytes on 64-bit, 4 bytes on 32-bit systems.
Note that this means Font, StyleInheritedData and RenderSVGInlineText shrink too.

* platform/graphics/FontDescription.cpp:
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::script):
(FontDescription):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (117867 => 117868)


--- trunk/Source/WebCore/ChangeLog	2012-05-22 01:49:38 UTC (rev 117867)
+++ trunk/Source/WebCore/ChangeLog	2012-05-22 01:53:10 UTC (rev 117868)
@@ -1,3 +1,18 @@
+2012-05-21  Rob Buis  <[email protected]>
+
+        Shrink FontDescription object size
+        https://bugs.webkit.org/show_bug.cgi?id=86950
+
+        Reviewed by Alexey Proskuryakov.
+
+        Reduce object size of FontDescription by 8 bytes on 64-bit, 4 bytes on 32-bit systems.
+        Note that this means Font, StyleInheritedData and RenderSVGInlineText shrink too.
+
+        * platform/graphics/FontDescription.cpp:
+        * platform/graphics/FontDescription.h:
+        (WebCore::FontDescription::script):
+        (FontDescription):
+
 2012-05-21  Abhishek Arya  <[email protected]>
 
         Regression(r117482): Run-in crashes relating to generated content and inline line box clearing.

Modified: trunk/Source/WebCore/platform/graphics/FontDescription.cpp (117867 => 117868)


--- trunk/Source/WebCore/platform/graphics/FontDescription.cpp	2012-05-22 01:49:38 UTC (rev 117867)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.cpp	2012-05-22 01:53:10 UTC (rev 117868)
@@ -34,7 +34,6 @@
 
 struct SameSizeAsFontDescription {
     FontFamily familyList;
-    void* settings;
     RefPtr<FontFeatureSettings> m_featureSettings;
     float sizes[2];
     // FXIME: Make them fit into one word.

Modified: trunk/Source/WebCore/platform/graphics/FontDescription.h (117867 => 117868)


--- trunk/Source/WebCore/platform/graphics/FontDescription.h	2012-05-22 01:49:38 UTC (rev 117867)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.h	2012-05-22 01:53:10 UTC (rev 117868)
@@ -127,7 +127,7 @@
     unsigned keywordSize() const { return m_keywordSize; }
     FontSmoothingMode fontSmoothing() const { return static_cast<FontSmoothingMode>(m_fontSmoothing); }
     TextRenderingMode textRenderingMode() const { return static_cast<TextRenderingMode>(m_textRendering); }
-    UScriptCode script() const { return m_script; }
+    UScriptCode script() const { return static_cast<UScriptCode>(m_script); }
 
     FontTraitsMask traitsMask() const;
     bool isSpecifiedFont() const { return m_isSpecifiedFont; }
@@ -202,7 +202,7 @@
     unsigned m_fontSmoothing : 2; // FontSmoothingMode
     unsigned m_textRendering : 2; // TextRenderingMode
     unsigned m_isSpecifiedFont : 1; // True if a web page specifies a non-generic font family as the first font family.
-    UScriptCode m_script; // Used to help choose an appropriate font for generic font families.
+    unsigned m_script : 7; // Used to help choose an appropriate font for generic font families.
 };
 
 inline bool FontDescription::operator==(const FontDescription& other) const
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to