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 f01e6b351c332f75f89c3982dfce261e907b11a2..728a27e84b67925f3b8bc508a5d6b03d9236d02f 100644 |
--- a/third_party/WebKit/Source/platform/graphics/PicturePattern.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/PicturePattern.cpp |
@@ -18,7 +18,7 @@ |
PicturePattern::PicturePattern(PassRefPtr<const SkPicture> picture, RepeatMode mode) |
: Pattern(mode) |
- , m_tilePicture(const_cast<SkPicture*>(picture.leakRef())) |
+ , m_tilePicture(picture) |
{ |
// All current clients use RepeatModeXY, so we only support this mode for now. |
ASSERT(isRepeatXY()); |
@@ -30,13 +30,13 @@ |
{ |
} |
-sk_sp<SkShader> PicturePattern::createShader() |
+PassRefPtr<SkShader> PicturePattern::createShader() |
{ |
SkMatrix localMatrix = affineTransformToSkMatrix(m_patternSpaceTransformation); |
SkRect tileBounds = m_tilePicture->cullRect(); |
- return SkShader::MakePictureShader(m_tilePicture, |
- SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &localMatrix, &tileBounds); |
+ return adoptRef(SkShader::CreatePictureShader(m_tilePicture.get(), |
+ SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &localMatrix, &tileBounds)); |
} |
} // namespace blink |