4.68MB below RenderStyle::filter() on Membuster3.
authorkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Nov 2012 19:37:50 +0000 (19:37 +0000)
committerkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Nov 2012 19:37:50 +0000 (19:37 +0000)
<http://webkit.org/b/101624>
<rdar://problem/12663822>

Reviewed by Darin Adler.

Rename the non-const RenderStyle::filter() to mutableFilter() since using it causes us to detach
from the rare non-inherited data (copy-on-write.)
Most call sites were calling filter() on a RenderStyle* which was causing the bloat.

4.68MB progression on Membuster3.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingSVGDocuments):
(WebCore::StyleResolver::loadPendingShaders):
* rendering/style/RenderStyle.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133926 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/rendering/style/RenderStyle.h

index d5c0227..f563dd2 100644 (file)
@@ -1,3 +1,22 @@
+2012-11-08  Andreas Kling  <kling@webkit.org>
+
+        4.68MB below RenderStyle::filter() on Membuster3.
+        <http://webkit.org/b/101624>
+        <rdar://problem/12663822>
+
+        Reviewed by Darin Adler.
+
+        Rename the non-const RenderStyle::filter() to mutableFilter() since using it causes us to detach
+        from the rare non-inherited data (copy-on-write.)
+        Most call sites were calling filter() on a RenderStyle* which was causing the bloat.
+
+        4.68MB progression on Membuster3.
+
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::loadPendingSVGDocuments):
+        (WebCore::StyleResolver::loadPendingShaders):
+        * rendering/style/RenderStyle.h:
+
 2012-11-08  Alexey Proskuryakov  <ap@apple.com>
 
         Create loader/blackberry directory, because svn-apply cannot apply a patch that
index 7ccdfff..4d7822f 100644 (file)
@@ -4581,7 +4581,7 @@ void StyleResolver::loadPendingSVGDocuments()
         return;
 
     CachedResourceLoader* cachedResourceLoader = m_element->document()->cachedResourceLoader();
-    Vector<RefPtr<FilterOperation> >& filterOperations = m_style->filter().operations();
+    Vector<RefPtr<FilterOperation> >& filterOperations = m_style->mutableFilter().operations();
     for (unsigned i = 0; i < filterOperations.size(); ++i) {
         RefPtr<FilterOperation> filterOperation = filterOperations.at(i);
         if (filterOperation->getOperationType() == FilterOperation::REFERENCE) {
@@ -4625,7 +4625,7 @@ void StyleResolver::loadPendingShaders()
 
     CachedResourceLoader* cachedResourceLoader = m_element->document()->cachedResourceLoader();
 
-    Vector<RefPtr<FilterOperation> >& filterOperations = m_style->filter().operations();
+    Vector<RefPtr<FilterOperation> >& filterOperations = m_style->mutableFilter().operations();
     for (unsigned i = 0; i < filterOperations.size(); ++i) {
         RefPtr<FilterOperation> filterOperation = filterOperations.at(i);
         if (filterOperation->getOperationType() == FilterOperation::CUSTOM) {
index 220cef5..a1db870 100644 (file)
@@ -981,7 +981,7 @@ public:
     ESpeak speak() const { return static_cast<ESpeak>(rareInheritedData->speak); }
 
 #if ENABLE(CSS_FILTERS)
-    FilterOperations& filter() { return rareNonInheritedData.access()->m_filter.access()->m_operations; }
+    FilterOperations& mutableFilter() { return rareNonInheritedData.access()->m_filter.access()->m_operations; }
     const FilterOperations& filter() const { return rareNonInheritedData->m_filter->m_operations; }
     bool hasFilter() const { return !rareNonInheritedData->m_filter->m_operations.operations().isEmpty(); }
 #else