Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(902)

Unified Diff: Source/core/rendering/svg/RenderSVGResourcePattern.h

Issue 869323003: Oilpan: move RenderObjects off heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review-induced improvements Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/svg/RenderSVGResourcePattern.h
diff --git a/Source/core/rendering/svg/RenderSVGResourcePattern.h b/Source/core/rendering/svg/RenderSVGResourcePattern.h
index 22c0973ff9e769602a2fe41188d22ab3317a3208..a9baf4632b9af0c0cce57b4535c02fc1b60aae76 100644
--- a/Source/core/rendering/svg/RenderSVGResourcePattern.h
+++ b/Source/core/rendering/svg/RenderSVGResourcePattern.h
@@ -52,23 +52,31 @@ public:
static const RenderSVGResourceType s_resourceType = PatternResourceType;
virtual RenderSVGResourceType resourceType() const override { return s_resourceType; }
- virtual void trace(Visitor*) override;
-
private:
PassOwnPtr<PatternData> buildPatternData(const RenderObject&);
PassRefPtr<const SkPicture> asPicture(const FloatRect& tile, const AffineTransform&) const;
PatternData* patternForRenderer(const RenderObject&);
bool m_shouldCollectPatternAttributes : 1;
+#if ENABLE(OILPAN)
+ Persistent<PatternAttributesWrapper> m_attributesWrapper;
+
+ PatternAttributes& mutableAttributes() { return m_attributesWrapper->attributes(); }
+ const PatternAttributes& attributes() const { return m_attributesWrapper->attributes(); }
+#else
PatternAttributes m_attributes;
+ PatternAttributes& mutableAttributes() { return m_attributes; }
+ const PatternAttributes& attributes() const { return m_attributes; }
+#endif
+
// FIXME: we can almost do away with this per-object map, but not quite: the tile size can be
// relative to the client bounding box, and it gets captured in the cached Pattern shader.
// Hence, we need one Pattern shader per client. The display list OTOH is the same => we
// should be able to cache a single display list per RenderSVGResourcePattern + one
// Pattern(shader) for each client -- this would avoid re-recording when multiple clients
// share the same pattern.
- HashMap<const RenderObject*, OwnPtr<PatternData> > m_patternMap;
+ HashMap<const RenderObject*, OwnPtr<PatternData>> m_patternMap;
};
}
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceLinearGradient.cpp ('k') | Source/core/rendering/svg/RenderSVGResourcePattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698