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

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

Issue 1779833002: Switch Blink SkShader clients to sk_sp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/PicturePattern.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/PicturePattern.cpp b/third_party/WebKit/Source/platform/graphics/PicturePattern.cpp
index 728a27e84b67925f3b8bc508a5d6b03d9236d02f..3e0da2afc592d0304a2773992fcef8fa1e10c424 100644
--- a/third_party/WebKit/Source/platform/graphics/PicturePattern.cpp
+++ b/third_party/WebKit/Source/platform/graphics/PicturePattern.cpp
@@ -18,7 +18,7 @@ PassRefPtr<PicturePattern> PicturePattern::create(PassRefPtr<const SkPicture> pi
PicturePattern::PicturePattern(PassRefPtr<const SkPicture> picture, RepeatMode mode)
: Pattern(mode)
- , m_tilePicture(picture)
+ , m_tilePicture(picture.leakRef())
reed1 2016/03/09 21:09:06 Could we change the parameter type to avoid this s
f(malita) 2016/03/10 13:57:58 We'll have to chase it up all the way to the produ
{
// All current clients use RepeatModeXY, so we only support this mode for now.
ASSERT(isRepeatXY());
@@ -30,13 +30,13 @@ PicturePattern::~PicturePattern()
{
}
-PassRefPtr<SkShader> PicturePattern::createShader()
+sk_sp<SkShader> PicturePattern::createShader()
{
SkMatrix localMatrix = affineTransformToSkMatrix(m_patternSpaceTransformation);
SkRect tileBounds = m_tilePicture->cullRect();
- return adoptRef(SkShader::CreatePictureShader(m_tilePicture.get(),
- SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &localMatrix, &tileBounds));
+ return SkShader::MakePictureShader(m_tilePicture,
+ SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &localMatrix, &tileBounds);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698