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

Unified Diff: third_party/WebKit/Source/core/paint/SVGPaintContext.h

Issue 1512803004: Use refs for GraphicsContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarTheme
Patch Set: Created 5 years 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: third_party/WebKit/Source/core/paint/SVGPaintContext.h
diff --git a/third_party/WebKit/Source/core/paint/SVGPaintContext.h b/third_party/WebKit/Source/core/paint/SVGPaintContext.h
index 6ce14ef855b2c96bd6060cb415c062f076f5036c..3ee222ab01555c48099d0194bfa4747a9151114b 100644
--- a/third_party/WebKit/Source/core/paint/SVGPaintContext.h
+++ b/third_party/WebKit/Source/core/paint/SVGPaintContext.h
@@ -45,9 +45,8 @@ class SVGPaintContext {
STACK_ALLOCATED();
public:
SVGPaintContext(const LayoutObject& object, const PaintInfo& paintInfo)
- : m_object(&object)
+ : m_object(object)
, m_paintInfo(paintInfo)
- , m_originalPaintInfo(&paintInfo)
, m_filter(nullptr)
, m_clipper(nullptr)
, m_clipperState(SVGClipPainter::ClipperNotApplied)
@@ -59,12 +58,12 @@ public:
~SVGPaintContext();
- PaintInfo& paintInfo() { return m_paintInfo; }
+ PaintInfo& paintInfo() { return m_filterPaintInfo ? *m_filterPaintInfo : m_paintInfo; }
// Return true if these operations aren't necessary or if they are successfully applied.
bool applyClipMaskAndFilterIfNecessary();
- static void paintSubtree(GraphicsContext*, const LayoutObject*);
+ static void paintSubtree(GraphicsContext&, const LayoutObject*);
// TODO(fs): This functions feels a bit misplaced (we don't want this to
// turn into the new kitchen sink). Move it if a better location surfaces.
@@ -84,9 +83,9 @@ private:
bool isIsolationInstalled() const;
- const LayoutObject* m_object;
+ const LayoutObject& m_object;
PaintInfo m_paintInfo;
- const PaintInfo* m_originalPaintInfo;
+ OwnPtr<PaintInfo> m_filterPaintInfo;
LayoutSVGResourceFilter* m_filter;
LayoutSVGResourceClipper* m_clipper;
SVGClipPainter::ClipperState m_clipperState;
« no previous file with comments | « third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp ('k') | third_party/WebKit/Source/core/paint/SVGPaintContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698