Chromium Code Reviews| 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 |