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

Unified Diff: Source/core/platform/graphics/GraphicsContext.cpp

Issue 17448009: Use skia::RefPtr to avoid having to manually refcount GraphicsContextState::m_looper. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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/platform/graphics/GraphicsContext.cpp
diff --git a/Source/core/platform/graphics/GraphicsContext.cpp b/Source/core/platform/graphics/GraphicsContext.cpp
index 63ca4a9e79f2705466185285b06b0a836ccd666b..c9da39c0e1a3c6ff6f3253f8e695f52315c73e6a 100644
--- a/Source/core/platform/graphics/GraphicsContext.cpp
+++ b/Source/core/platform/graphics/GraphicsContext.cpp
@@ -293,7 +293,7 @@ void GraphicsContext::setDrawLooper(const DrawLooper& drawLooper)
if (paintingDisabled())
return;
- setDrawLooper(drawLooper.skDrawLooper());
+ m_state->m_looper = drawLooper.skDrawLooper();
}
void GraphicsContext::clearDrawLooper()
@@ -301,7 +301,7 @@ void GraphicsContext::clearDrawLooper()
if (paintingDisabled())
return;
- setDrawLooper(0);
+ m_state->m_looper.clear();
}
bool GraphicsContext::hasShadow() const
@@ -1724,7 +1724,7 @@ void GraphicsContext::setupPaintCommon(SkPaint* paint) const
paint->setAntiAlias(m_state->m_shouldAntialias);
paint->setXfermodeMode(m_state->m_xferMode);
- paint->setLooper(m_state->m_looper);
+ paint->setLooper(m_state->m_looper.get());
}
void GraphicsContext::drawOuterPath(const SkPath& path, SkPaint& paint, int width)
« no previous file with comments | « Source/core/platform/graphics/GraphicsContext.h ('k') | Source/core/platform/graphics/GraphicsContextState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698