Changeset 90399 in webkit
- Timestamp:
- Jul 5, 2011 9:07:35 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r90397 r90399 1 2011-07-05 Tamas Czene <Czene.Tamas@stud.u-szeged.hu> 2 3 Reviewed by Simon Fraser. 4 5 Remove virtual functions from StyleImage. 6 https://bugs.webkit.org/show_bug.cgi?id=63909 7 8 We can remove the virtual "isChachedImage, isPendingImage, isGeneratedImage" functions to speed up the StyleImage. 9 Some profile data shows this part is significant, especially in small CSS-based sites. 10 Removing the virtual functions - removing the calls - makes a small performance progression on this part. 11 12 * rendering/style/StyleCachedImage.h: 13 (WebCore::StyleCachedImage::StyleCachedImage): 14 * rendering/style/StyleGeneratedImage.h: 15 (WebCore::StyleGeneratedImage::StyleGeneratedImage): 16 * rendering/style/StyleImage.h: 17 (WebCore::StyleImage::isCachedImage): 18 (WebCore::StyleImage::isPendingImage): 19 (WebCore::StyleImage::isGeneratedImage): 20 (WebCore::StyleImage::StyleImage): 21 * rendering/style/StylePendingImage.h: 22 (WebCore::StylePendingImage::StylePendingImage): 23 1 24 2011-07-05 Pavel Feldman <pfeldman@google.com> 2 25 -
trunk/Source/WebCore/rendering/style/StyleCachedImage.h
r76571 r90399 37 37 virtual WrappedImagePtr data() const { return m_image.get(); } 38 38 39 virtual bool isCachedImage() const { return true; }40 41 39 virtual PassRefPtr<CSSValue> cssValue() const; 42 40 … … 59 57 : m_image(image) 60 58 { 59 m_isCachedImage = true; 61 60 } 62 61 -
trunk/Source/WebCore/rendering/style/StyleGeneratedImage.h
r76571 r90399 41 41 virtual WrappedImagePtr data() const { return m_generator; } 42 42 43 virtual bool isGeneratedImage() const { return true; }44 45 43 virtual PassRefPtr<CSSValue> cssValue() const; 46 44 … … 59 57 , m_fixedSize(fixedSize) 60 58 { 59 m_isGeneratedImage = true; 61 60 } 62 61 -
trunk/Source/WebCore/rendering/style/StyleImage.h
r76571 r90399 63 63 virtual WrappedImagePtr data() const = 0; 64 64 65 virtual bool isCachedImage() const { return false; }66 virtual bool isPendingImage() const { return false; }67 virtual bool isGeneratedImage() const { return false; }65 ALWAYS_INLINE bool isCachedImage() const { return m_isCachedImage; } 66 ALWAYS_INLINE bool isPendingImage() const { return m_isPendingImage; } 67 ALWAYS_INLINE bool isGeneratedImage() const { return m_isGeneratedImage; } 68 68 69 69 static bool imagesEquivalent(StyleImage* image1, StyleImage* image2) … … 78 78 79 79 protected: 80 StyleImage() { } 80 StyleImage() 81 : m_isCachedImage(false) 82 , m_isPendingImage(false) 83 , m_isGeneratedImage(false) 84 { 85 } 86 bool m_isCachedImage:1; 87 bool m_isPendingImage:1; 88 bool m_isGeneratedImage:1; 81 89 }; 82 90 -
trunk/Source/WebCore/rendering/style/StylePendingImage.h
r76571 r90399 42 42 virtual WrappedImagePtr data() const { return m_value; } 43 43 44 virtual bool isPendingImage() const { return true; }45 46 44 virtual PassRefPtr<CSSValue> cssValue() const { return m_value; } 47 45 CSSImageValue* cssImageValue() const { return m_value; } … … 64 62 : m_value(value) 65 63 { 64 m_isPendingImage = true; 66 65 } 67 66
Note: See TracChangeset
for help on using the changeset viewer.