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

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: rebase after MakePictureShader constness change 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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/PicturePattern.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f01e6b351c332f75f89c3982dfce261e907b11a2 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(const_cast<SkPicture*>(picture.leakRef()))
{
// 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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/PicturePattern.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698