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

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

Issue 1789063005: Add sk_sp helpers and switch Blink SkShader clients to the new APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fromSkSp, review comments 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/GeneratedImage.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp b/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp
index afe68b2419c1b73ab320a33ff569789c17523f26..5a1b25147f3bbf1f335b6ee5fcb8694eec06d51a 100644
--- a/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp
@@ -47,14 +47,14 @@ void GeneratedImage::drawPattern(GraphicsContext& destContext, const FloatRect&
SkPictureBuilder builder(tileRect, nullptr, &destContext);
builder.context().beginRecording(tileRect);
drawTile(builder.context(), srcRect);
- RefPtr<const SkPicture> tilePicture = builder.endRecording();
+ RefPtr<SkPicture> tilePicture = builder.endRecording();
AffineTransform patternTransform;
patternTransform.translate(phase.x(), phase.y());
patternTransform.scale(scale.width(), scale.height());
patternTransform.translate(tileRect.x(), tileRect.y());
- RefPtr<Pattern> picturePattern = Pattern::createPicturePattern(tilePicture);
+ RefPtr<Pattern> picturePattern = Pattern::createPicturePattern(tilePicture.release());
Stephen White 2016/03/18 14:48:27 Out of curiosity, is this release() necessary? Or
f(malita) 2016/03/18 15:11:53 The latter: it would work fine without a release,
picturePattern->setPatternSpaceTransform(patternTransform);
SkPaint fillPaint = destContext.fillPaint();

Powered by Google App Engine
This is Rietveld 408576698