Changeset 220378 in webkit
- Timestamp:
- Aug 7, 2017, 7:46:06 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r220376 r220378 1 2017-08-07 Simon Fraser <simon.fraser@apple.com> 2 3 Inline ~Color and Color::isExtended() 4 https://bugs.webkit.org/show_bug.cgi?id=175293 5 6 Reviewed by Zalan Bujtas. 7 8 The Color destructor and Color::isExtended() show up on profiles, so inline them. 9 Before r207265 the destructor was inlined. 10 11 Also make sure that LengthSize::operator== is inlined, which it was not (according 12 to profiles). 13 14 * platform/LengthSize.h: 15 (WebCore::operator==): 16 * platform/graphics/Color.cpp: 17 (WebCore::Color::~Color): Deleted. 18 (WebCore::Color::isExtended const): Deleted. 19 * platform/graphics/Color.h: 20 (WebCore::Color::~Color): 21 (WebCore::Color::isExtended const): 22 1 23 2017-08-04 Brent Fulgham <bfulgham@apple.com> 2 24 -
trunk/Source/WebCore/platform/LengthSize.h
r210758 r220378 29 29 }; 30 30 31 inlinebool operator==(const LengthSize& a, const LengthSize& b)31 ALWAYS_INLINE bool operator==(const LengthSize& a, const LengthSize& b) 32 32 { 33 33 return a.width == b.width && a.height == b.height; -
trunk/Source/WebCore/platform/graphics/Color.cpp
r215172 r220378 308 308 } 309 309 310 Color::~Color()311 {312 if (isExtended())313 m_colorData.extendedColor->deref();314 }315 316 310 Color& Color::operator=(const Color& other) 317 311 { … … 666 660 } 667 661 668 bool Color::isExtended() const669 {670 return !(m_colorData.rgbaAndFlags & invalidRGBAColor);671 }672 673 662 ExtendedColor& Color::asExtended() const 674 663 { -
trunk/Source/WebCore/platform/graphics/Color.h
r218717 r220378 174 174 WEBCORE_EXPORT Color(Color&&); 175 175 176 WEBCORE_EXPORT ~Color(); 176 ~Color() 177 { 178 if (isExtended()) 179 m_colorData.extendedColor->deref(); 180 } 177 181 178 182 static Color createUnchecked(int r, int g, int b) … … 275 279 #endif 276 280 277 WEBCORE_EXPORT bool isExtended() const; 281 bool isExtended() const 282 { 283 return !(m_colorData.rgbaAndFlags & invalidRGBAColor); 284 } 278 285 WEBCORE_EXPORT ExtendedColor& asExtended() const; 279 286
Note:
See TracChangeset
for help on using the changeset viewer.