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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsContextState.cpp

Issue 2290903002: Change (Pass)RefPtr<SkXxx> into sk_sp<SkXxx>. (Closed)
Patch Set: Rebasing... Created 4 years, 3 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: third_party/WebKit/Source/platform/graphics/GraphicsContextState.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContextState.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsContextState.cpp
index 33bcbd60729ad12adc4739e187fe36dd0b4c70ef..20b13de704be87c332ee5972e5c5ea04021feaa6 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsContextState.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsContextState.cpp
@@ -97,12 +97,12 @@ void GraphicsContextState::setFillColor(const Color& color)
}
// Shadow. (This will need tweaking if we use draw loopers for other things.)
-void GraphicsContextState::setDrawLooper(PassRefPtr<SkDrawLooper> drawLooper)
+void GraphicsContextState::setDrawLooper(sk_sp<SkDrawLooper> drawLooper)
{
// Grab a new ref for stroke.
m_strokePaint.setLooper(sk_ref_sp(drawLooper.get()));
// Pass the existing ref to fill (to minimize refcount churn).
- m_fillPaint.setLooper(toSkSp(drawLooper));
+ m_fillPaint.setLooper(std::move(drawLooper));
}
void GraphicsContextState::setLineDash(const DashArray& dashes, float dashOffset)
@@ -110,12 +110,12 @@ void GraphicsContextState::setLineDash(const DashArray& dashes, float dashOffset
m_strokeData.setLineDash(dashes, dashOffset);
}
-void GraphicsContextState::setColorFilter(PassRefPtr<SkColorFilter> colorFilter)
+void GraphicsContextState::setColorFilter(sk_sp<SkColorFilter> colorFilter)
{
// Grab a new ref for stroke.
m_strokePaint.setColorFilter(sk_ref_sp(colorFilter.get()));
// Pass the existing ref to fill (to minimize refcount churn).
- m_fillPaint.setColorFilter(toSkSp(colorFilter));
+ m_fillPaint.setColorFilter(std::move(colorFilter));
}
void GraphicsContextState::setInterpolationQuality(InterpolationQuality quality)

Powered by Google App Engine
This is Rietveld 408576698