Bug 251774

Summary: Optimize layout of Font to reduce padding
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: TextAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, heycam, mmaxfield, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Simon Fraser (smfr)
Reported 2023-02-05 21:56:23 PST
OpenSource % /usr/bin/python3 ./Tools/Scripts/dump-class-layout -c Release WebCore Font +0 <1272> WebCore::Font +0 < 4> WTF::RefCounted<WebCore::Font, std::__1::default_delete<WebCore::Font> > WTF::RefCounted<WebCore::Font, std::__1::default_delete<WebCore::Font> > +0 < 4> WTF::RefCountedBase WTF::RefCountedBase +0 < 4> unsigned int m_refCount +4 < 68> WebCore::FontMetrics m_fontMetrics +4 < 4> unsigned int m_unitsPerEm +8 < 4> float m_floatAscent +12 < 4> float m_floatDescent +16 < 4> float m_floatLineGap +20 < 4> float m_floatLineSpacing +24 < 4> float m_floatCapHeight +28 < 4> int m_intAscent +32 < 4> int m_intDescent +36 < 4> int m_intLineGap +40 < 4> int m_intLineSpacing +44 < 4> int m_intCapHeight +48 < 8> std::__1::optional<float> m_zeroWidth +48 < 8> std::__1::__optional_move_assign_base<float, true> std::__1::__optional_move_assign_base<float, true> +48 < 8> std::__1::__optional_copy_assign_base<float, true> std::__1::__optional_copy_assign_base<float, true> +48 < 8> std::__1::__optional_move_base<float, true> std::__1::__optional_move_base<float, true> +48 < 8> std::__1::__optional_copy_base<float, true> std::__1::__optional_copy_base<float, true> +48 < 8> std::__1::__optional_storage_base<float, false> std::__1::__optional_storage_base<float, false> +48 < 8> std::__1::__optional_destruct_base<float, true> std::__1::__optional_destruct_base<float, true> +48 < 4> std::__1::__optional_destruct_base<float, true>::(anonymous union) None +52 < 1> bool __engaged_ +48 < 1> std::__1::__optional_sfinae_ctor_base_t<float> std::__1::__optional_sfinae_ctor_base_t<float> +48 < 1> std::__1::__optional_sfinae_assign_base_t<float> std::__1::__optional_sfinae_assign_base_t<float> +53 < 3> <PADDING: 3 bytes> +56 < 4> float m_ideogramWidth +60 < 4> float m_xHeight +64 < 4> float m_underlinePosition +68 < 4> float m_underlineThickness +72 < 4> float m_maxCharWidth +76 < 4> float m_avgCharWidth +80 < 56> const WebCore::FontPlatformData m_platformData +80 < 8> WTF::RetainPtr<const __CTFont *> m_font +80 < 8> CFTypeRef m_ptr +88 < 8> WTF::RetainPtr<const __CTFont *> m_ctFont +88 < 8> CFTypeRef m_ptr +96 < 4> float m_size +100 < 1> WebCore::FontOrientation m_orientation +101 < 1> WebCore::FontWidthVariant m_widthVariant +102 < 1> WebCore::TextRenderingMode m_textRenderingMode +103 < 1> <PADDING: 1 byte> +104 < 24> std::__1::optional<WebCore::FontPlatformData::CreationData> m_creationData +104 < 24> std::__1::__optional_move_assign_base<WebCore::FontPlatformData::CreationData, false> std::__1::__optional_move_assign_base<WebCore::FontPlatformData::CreationData, false> +104 < 24> std::__1::__optional_copy_assign_base<WebCore::FontPlatformData::CreationData, false> std::__1::__optional_copy_assign_base<WebCore::FontPlatformData::CreationData, false> +104 < 24> std::__1::__optional_move_base<WebCore::FontPlatformData::CreationData, false> std::__1::__optional_move_base<WebCore::FontPlatformData::CreationData, false> +104 < 24> std::__1::__optional_copy_base<WebCore::FontPlatformData::CreationData, false> std::__1::__optional_copy_base<WebCore::FontPlatformData::CreationData, false> +104 < 24> std::__1::__optional_storage_base<WebCore::FontPlatformData::CreationData, false> std::__1::__optional_storage_base<WebCore::FontPlatformData::CreationData, false> +104 < 24> std::__1::__optional_destruct_base<WebCore::FontPlatformData::CreationData, false> std::__1::__optional_destruct_base<WebCore::FontPlatformData::CreationData, false> +104 < 16> std::__1::__optional_destruct_base<WebCore::FontPlatformData::CreationData, false>::(anonymous union) None +120 < 1> bool __engaged_ +104 < 1> std::__1::__optional_sfinae_ctor_base_t<WebCore::FontPlatformData::CreationData> std::__1::__optional_sfinae_ctor_base_t<WebCore::FontPlatformData::CreationData> +104 < 1> std::__1::__optional_sfinae_assign_base_t<WebCore::FontPlatformData::CreationData> std::__1::__optional_sfinae_assign_base_t<WebCore::FontPlatformData::CreationData> +121 < 7> <PADDING: 7 bytes> +128 < 1> bool m_syntheticBold +129 < 1> bool m_syntheticOblique +130 < 1> bool m_isColorBitmapFont +131 < 1> bool m_isHashTableDeletedValue +132 < 1> bool m_isSystemFont +133 < 1> bool m_hasVariations +134 < 2> <PADDING: 2 bytes> +136 < 8> WTF::RefPtr<WebCore::GlyphPage, WTF::RawPtrTraits<WebCore::GlyphPage>, WTF::DefaultRefDerefTraits<WebCore::GlyphPage> > m_glyphPageZero +136 < 8> WTF::RawPtrTraits<WebCore::GlyphPage>::StorageType m_ptr +144 < 8> WTF::HashMap<unsigned int, WTF::RefPtr<WebCore::GlyphPage, WTF::RawPtrTraits<WebCore::GlyphPage>, WTF::DefaultRefDerefTraits<WebCore::GlyphPage> >, WTF::DefaultHash<unsigned int>, WTF::HashTraits<unsigned int>, WTF::HashTraits<WTF::RefPtr<WebCore::GlyphPage, WTF::RawPtrTraits<WebCore::GlyphPage>, WTF::DefaultRefDerefTraits<WebCore::GlyphPage> > >, WTF::HashTableTraits> m_glyphPages +144 < 8> WTF::HashMap<unsigned int, WTF::RefPtr<WebCore::GlyphPage, WTF::RawPtrTraits<WebCore::GlyphPage>, WTF::DefaultRefDerefTraits<WebCore::GlyphPage> >, WTF::DefaultHash<unsigned int>, WTF::HashTraits<unsigned int>, WTF::HashTraits<WTF::RefPtr<WebCore::GlyphPage, WTF::RawPtrTraits<WebCore::GlyphPage>, WTF::DefaultRefDerefTraits<WebCore::GlyphPage> > >, WTF::HashTableTraits>::HashTableType m_impl +144 < 8> WTF::HashTable<unsigned int, WTF::KeyValuePair<unsigned int, WTF::RefPtr<WebCore::GlyphPage, WTF::RawPtrTraits<WebCore::GlyphPage>, WTF::DefaultRefDerefTraits<WebCore::GlyphPage> > >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<unsigned int, WTF::RefPtr<WebCore::GlyphPage, WTF::RawPtrTraits<WebCore::GlyphPage>, WTF::DefaultRefDerefTraits<WebCore::GlyphPage> > > >, WTF::DefaultHash<unsigned int>, WTF::HashMap<unsigned int, WTF::RefPtr<WebCore::GlyphPage, WTF::RawPtrTraits<WebCore::GlyphPage>, WTF::DefaultRefDerefTraits<WebCore::GlyphPage> >, WTF::DefaultHash<unsigned int>, WTF::HashTraits<unsigned int>, WTF::HashTraits<WTF::RefPtr<WebCore::GlyphPage, WTF::RawPtrTraits<WebCore::GlyphPage>, WTF::DefaultRefDerefTraits<WebCore::GlyphPage> > >, WTF::HashTableTraits>::KeyValuePairTraits, WTF::HashTraits<unsigned int> >::(anonymous union) None +152 < 8> std::__1::unique_ptr<WebCore::GlyphMetricsMap<WebCore::FloatRect>, std::__1::default_delete<WebCore::GlyphMetricsMap<WebCore::FloatRect> > > m_glyphToBoundsMap +152 < 8> std::__1::__compressed_pair<WebCore::GlyphMetricsMap<WebCore::FloatRect> *, std::__1::default_delete<WebCore::GlyphMetricsMap<WebCore::FloatRect> > > __ptr_ +152 < 8> std::__1::__compressed_pair_elem<WebCore::GlyphMetricsMap<WebCore::FloatRect> *, 0, false> std::__1::__compressed_pair_elem<WebCore::GlyphMetricsMap<WebCore::FloatRect> *, 0, false> +152 < 8> WebCore::GlyphMetricsMap<WebCore::FloatRect> * __value_ +152 < 1> std::__1::__compressed_pair_elem<std::__1::default_delete<WebCore::GlyphMetricsMap<WebCore::FloatRect> >, 1, true> std::__1::__compressed_pair_elem<std::__1::default_delete<WebCore::GlyphMetricsMap<WebCore::FloatRect> >, 1, true> +152 < 1> std::__1::default_delete<WebCore::GlyphMetricsMap<WebCore::FloatRect> > std::__1::default_delete<WebCore::GlyphMetricsMap<WebCore::FloatRect> > +160 < 80> WebCore::GlyphMetricsMap<float> m_glyphToWidthMap +160 < 1> bool m_filledPrimaryPage +161 < 3> <PADDING: 3 bytes> +164 < 64> WebCore::GlyphMetricsMap<float>::GlyphMetricsPage m_primaryPage +164 < 64> std::__1::array<float, 16> m_metrics +164 < 64> float[16] __elems_ +228 < 4> <PADDING: 4 bytes> +232 < 8> WTF::HashMap<int, std::__1::unique_ptr<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage> >, WTF::DefaultHash<int>, WTF::HashTraits<int>, WTF::HashTraits<std::__1::unique_ptr<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage> > >, WTF::HashTableTraits> m_pages +232 < 8> WTF::HashMap<int, std::__1::unique_ptr<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage> >, WTF::DefaultHash<int>, WTF::HashTraits<int>, WTF::HashTraits<std::__1::unique_ptr<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage> > >, WTF::HashTableTraits>::HashTableType m_impl +232 < 8> WTF::HashTable<int, WTF::KeyValuePair<int, std::__1::unique_ptr<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage> > >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<int, std::__1::unique_ptr<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage> > > >, WTF::DefaultHash<int>, WTF::HashMap<int, std::__1::unique_ptr<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage> >, WTF::DefaultHash<int>, WTF::HashTraits<int>, WTF::HashTraits<std::__1::unique_ptr<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<float>::GlyphMetricsPage> > >, WTF::HashTableTraits>::KeyValuePairTraits, WTF::HashTraits<int> >::(anonymous union) None +240 <912> WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> > m_glyphPathMap +240 < 1> bool m_filledPrimaryPage +241 < 7> <PADDING: 7 bytes> +248 <896> WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage m_primaryPage +248 <896> std::__1::array<std::__1::optional<WebCore::Path>, 16> m_metrics +248 <896> std::__1::optional<WebCore::Path>[16] __elems_ +1144 < 8> WTF::HashMap<int, std::__1::unique_ptr<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage> >, WTF::DefaultHash<int>, WTF::HashTraits<int>, WTF::HashTraits<std::__1::unique_ptr<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage> > >, WTF::HashTableTraits> m_pages +1144 < 8> WTF::HashMap<int, std::__1::unique_ptr<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage> >, WTF::DefaultHash<int>, WTF::HashTraits<int>, WTF::HashTraits<std::__1::unique_ptr<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage> > >, WTF::HashTableTraits>::HashTableType m_impl +1144 < 8> WTF::HashTable<int, WTF::KeyValuePair<int, std::__1::unique_ptr<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage> > >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<int, std::__1::unique_ptr<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage> > > >, WTF::DefaultHash<int>, WTF::HashMap<int, std::__1::unique_ptr<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage> >, WTF::DefaultHash<int>, WTF::HashTraits<int>, WTF::HashTraits<std::__1::unique_ptr<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage, std::__1::default_delete<WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage> > >, WTF::HashTableTraits>::KeyValuePairTraits, WTF::HashTraits<int> >::(anonymous union) None +1152 < 8> WTF::BitVector m_codePointSupport +1152 < 8> uintptr_t m_bitsOrPointer +1160 < 8> WTF::RefPtr<WebCore::OpenTypeMathData, WTF::RawPtrTraits<WebCore::OpenTypeMathData>, WTF::DefaultRefDerefTraits<WebCore::OpenTypeMathData> > m_mathData +1160 < 8> WTF::RawPtrTraits<WebCore::OpenTypeMathData>::StorageType m_ptr +1168 < 16> std::__1::optional<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType> > m_renderingResourceIdentifier +1168 < 16> std::__1::__optional_move_assign_base<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, true> std::__1::__optional_move_assign_base<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, true> +1168 < 16> std::__1::__optional_copy_assign_base<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, true> std::__1::__optional_copy_assign_base<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, true> +1168 < 16> std::__1::__optional_move_base<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, true> std::__1::__optional_move_base<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, true> +1168 < 16> std::__1::__optional_copy_base<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, true> std::__1::__optional_copy_base<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, true> +1168 < 16> std::__1::__optional_storage_base<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, false> std::__1::__optional_storage_base<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, false> +1168 < 16> std::__1::__optional_destruct_base<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, true> std::__1::__optional_destruct_base<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, true> +1168 < 8> std::__1::__optional_destruct_base<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType>, true>::(anonymous union) None +1176 < 1> bool __engaged_ +1168 < 1> std::__1::__optional_sfinae_ctor_base_t<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType> > std::__1::__optional_sfinae_ctor_base_t<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType> > +1168 < 1> std::__1::__optional_sfinae_assign_base_t<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType> > std::__1::__optional_sfinae_assign_base_t<WTF::ObjectIdentifier<WebCore::RenderingResourceIdentifierType> > +1177 < 7> <PADDING: 7 bytes> +1184 < 8> std::__1::unique_ptr<WebCore::Font::DerivedFonts, std::__1::default_delete<WebCore::Font::DerivedFonts> > m_derivedFontData +1184 < 8> std::__1::__compressed_pair<WebCore::Font::DerivedFonts *, std::__1::default_delete<WebCore::Font::DerivedFonts> > __ptr_ +1184 < 8> std::__1::__compressed_pair_elem<WebCore::Font::DerivedFonts *, 0, false> std::__1::__compressed_pair_elem<WebCore::Font::DerivedFonts *, 0, false> +1184 < 8> WebCore::Font::DerivedFonts * __value_ +1184 < 1> std::__1::__compressed_pair_elem<std::__1::default_delete<WebCore::Font::DerivedFonts>, 1, true> std::__1::__compressed_pair_elem<std::__1::default_delete<WebCore::Font::DerivedFonts>, 1, true> +1184 < 1> std::__1::default_delete<WebCore::Font::DerivedFonts> std::__1::default_delete<WebCore::Font::DerivedFonts> +1192 < 4> WebCore::Font::SupportsFeature m_supportsSmallCaps +1196 < 4> WebCore::Font::SupportsFeature m_supportsAllSmallCaps +1200 < 4> WebCore::Font::SupportsFeature m_supportsPetiteCaps +1204 < 4> WebCore::Font::SupportsFeature m_supportsAllPetiteCaps +1208 < 16> std::__1::optional<PAL::OTSVGTable> m_otSVGTable +1208 < 16> std::__1::__optional_move_assign_base<PAL::OTSVGTable, false> std::__1::__optional_move_assign_base<PAL::OTSVGTable, false> +1208 < 16> std::__1::__optional_copy_assign_base<PAL::OTSVGTable, false> std::__1::__optional_copy_assign_base<PAL::OTSVGTable, false> +1208 < 16> std::__1::__optional_move_base<PAL::OTSVGTable, false> std::__1::__optional_move_base<PAL::OTSVGTable, false> +1208 < 16> std::__1::__optional_copy_base<PAL::OTSVGTable, false> std::__1::__optional_copy_base<PAL::OTSVGTable, false> +1208 < 16> std::__1::__optional_storage_base<PAL::OTSVGTable, false> std::__1::__optional_storage_base<PAL::OTSVGTable, false> +1208 < 16> std::__1::__optional_destruct_base<PAL::OTSVGTable, false> std::__1::__optional_destruct_base<PAL::OTSVGTable, false> +1208 < 8> std::__1::__optional_destruct_base<PAL::OTSVGTable, false>::(anonymous union) None +1216 < 1> bool __engaged_ +1208 < 1> std::__1::__optional_sfinae_ctor_base_t<PAL::OTSVGTable> std::__1::__optional_sfinae_ctor_base_t<PAL::OTSVGTable> +1208 < 1> std::__1::__optional_sfinae_assign_base_t<PAL::OTSVGTable> std::__1::__optional_sfinae_assign_base_t<PAL::OTSVGTable> +1217 < 7> <PADDING: 7 bytes> +1224 < 24> std::__1::optional<WebCore::Font::ComplexColorFormatGlyphs> m_glyphsWithComplexColorFormat +1224 < 24> std::__1::__optional_move_assign_base<WebCore::Font::ComplexColorFormatGlyphs, false> std::__1::__optional_move_assign_base<WebCore::Font::ComplexColorFormatGlyphs, false> +1224 < 24> std::__1::__optional_copy_assign_base<WebCore::Font::ComplexColorFormatGlyphs, false> std::__1::__optional_copy_assign_base<WebCore::Font::ComplexColorFormatGlyphs, false> +1224 < 24> std::__1::__optional_move_base<WebCore::Font::ComplexColorFormatGlyphs, false> std::__1::__optional_move_base<WebCore::Font::ComplexColorFormatGlyphs, false> +1224 < 24> std::__1::__optional_copy_base<WebCore::Font::ComplexColorFormatGlyphs, false> std::__1::__optional_copy_base<WebCore::Font::ComplexColorFormatGlyphs, false> +1224 < 24> std::__1::__optional_storage_base<WebCore::Font::ComplexColorFormatGlyphs, false> std::__1::__optional_storage_base<WebCore::Font::ComplexColorFormatGlyphs, false> +1224 < 24> std::__1::__optional_destruct_base<WebCore::Font::ComplexColorFormatGlyphs, false> std::__1::__optional_destruct_base<WebCore::Font::ComplexColorFormatGlyphs, false> +1224 < 16> std::__1::__optional_destruct_base<WebCore::Font::ComplexColorFormatGlyphs, false>::(anonymous union) None +1240 < 1> bool __engaged_ +1224 < 1> std::__1::__optional_sfinae_ctor_base_t<WebCore::Font::ComplexColorFormatGlyphs> std::__1::__optional_sfinae_ctor_base_t<WebCore::Font::ComplexColorFormatGlyphs> +1224 < 1> std::__1::__optional_sfinae_assign_base_t<WebCore::Font::ComplexColorFormatGlyphs> std::__1::__optional_sfinae_assign_base_t<WebCore::Font::ComplexColorFormatGlyphs> +1241 < 7> <PADDING: 7 bytes> +1248 < 2> WebCore::Glyph m_spaceGlyph +1250 < 2> WebCore::Glyph m_zeroWidthSpaceGlyph +1252 < 1> WebCore::Font::Origin m_origin +1253 < 1> WebCore::Font::Visibility m_visibility +1254 < 2> <PADDING: 2 bytes> +1256 < 4> float m_spaceWidth +1260 < 4> float m_syntheticBoldOffset +1264 < :1> unsigned int m_treatAsFixedPitch : 1 +1264 < :1> unsigned int m_isInterstitial : 1 +1264 < :1> unsigned int m_isTextOrientationFallback : 1 +1264 < :1> unsigned int m_isBrokenIdeographFallback : 1 +1264 < :1> unsigned int m_hasVerticalGlyphs : 1 +1264 < :1> unsigned int m_isUsedInSystemFallbackFontCache : 1 +1264 < :1> unsigned int m_allowsAntialiasing : 1 +1264 < :1> <UNUSED BITS: 1 bit> +1265 < 7> <PADDING: 7 bytes> Total byte size: 1272 Total pad bytes: 57 Padding percentage: 4.48 % OpenSource %
Attachments
Patch (2.42 KB, patch)
2023-02-05 21:59 PST, Simon Fraser (smfr)
no flags
Radar WebKit Bug Importer
Comment 1 2023-02-05 21:56:50 PST
Simon Fraser (smfr)
Comment 2 2023-02-05 21:59:18 PST
Darin Adler
Comment 3 2023-02-05 22:13:20 PST
Comment on attachment 464861 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=464861&action=review > COMMIT_MESSAGE:9 > +Reduces size from 1272 to 1256 bytes. That is a lot of bytes! The padding was not a significant fraction. I wonder what the big users are and if this really needs to be over 1000 bytes.
Simon Fraser (smfr)
Comment 4 2023-02-06 08:29:46 PST
(In reply to Darin Adler from comment #3) > Comment on attachment 464861 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=464861&action=review > > > COMMIT_MESSAGE:9 > > +Reduces size from 1272 to 1256 bytes. > > That is a lot of bytes! The padding was not a significant fraction. I wonder > what the big users are and if this really needs to be over 1000 bytes. The large members (see the second column): +80 < 56> const WebCore::FontPlatformData m_platformData +164 < 64> WebCore::GlyphMetricsMap<float>::GlyphMetricsPage m_primaryPage +248 <896> WebCore::GlyphMetricsMap<std::__1::optional<WebCore::Path> >::GlyphMetricsPage m_primaryPage That last one could be heap allocated?
Darin Adler
Comment 5 2023-02-06 09:01:53 PST
I guess heap allocated might not be an improvement.
Darin Adler
Comment 6 2023-02-06 09:02:14 PST
Unless it’s often missing, in which case it would indeed be an improvement!
EWS
Comment 7 2023-02-06 09:17:37 PST
Committed 259896@main (c62b38e4e53b): <https://commits.webkit.org/259896@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 464861 [details].
Note You need to log in before you can comment on or make changes to this bug.