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

Unified Diff: third_party/WebKit/Source/platform/graphics/Pattern.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/Pattern.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Pattern.cpp b/third_party/WebKit/Source/platform/graphics/Pattern.cpp
index ce773d59b50118c1770aa8b67cf971dfbafa1aa7..480b11582395cc0dd3d02db2dccb00b7f0d4b546 100644
--- a/third_party/WebKit/Source/platform/graphics/Pattern.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Pattern.cpp
@@ -29,6 +29,7 @@
#include "platform/graphics/ImagePattern.h"
#include "platform/graphics/PicturePattern.h"
+#include "platform/graphics/skia/SkiaUtils.h"
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkPicture.h"
#include "third_party/skia/include/core/SkShader.h"
@@ -41,7 +42,7 @@ PassRefPtr<Pattern> Pattern::createImagePattern(PassRefPtr<Image> tileImage, Rep
return ImagePattern::create(tileImage, repeatMode);
}
-PassRefPtr<Pattern> Pattern::createPicturePattern(PassRefPtr<const SkPicture> picture,
+PassRefPtr<Pattern> Pattern::createPicturePattern(PassRefPtr<SkPicture> picture,
RepeatMode repeatMode)
{
return PicturePattern::create(picture, repeatMode);
@@ -65,7 +66,7 @@ void Pattern::applyToPaint(SkPaint& paint)
m_pattern = createShader();
}
- paint.setShader(m_pattern.get());
+ paint.setShader(toSkSp(m_pattern));
}
void Pattern::setPatternSpaceTransform(const AffineTransform& patternSpaceTransformation)

Powered by Google App Engine
This is Rietveld 408576698