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

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

Issue 1814473003: Revert of 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: 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/ImagePattern.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp b/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp
index d390aecf106a47efa55f129a512942c8f2cdc85f..32f4aa92910d0cbfee0cbbb372ef28af52f425e3 100644
--- a/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp
@@ -33,13 +33,13 @@
PassRefPtr<SkShader> ImagePattern::createShader()
{
if (!m_tileImage)
- return adoptRef(SkShader::MakeColorShader(SK_ColorTRANSPARENT));
+ return adoptRef(SkShader::CreateColorShader(SK_ColorTRANSPARENT));
SkMatrix localMatrix = affineTransformToSkMatrix(m_patternSpaceTransformation);
if (isRepeatXY()) {
// Fast path: for repeatXY we just return a shader from the original image.
- return adoptRef(m_tileImage->makeShader(SkShader::kRepeat_TileMode,
+ return adoptRef(m_tileImage->newShader(SkShader::kRepeat_TileMode,
SkShader::kRepeat_TileMode, &localMatrix));
}
@@ -61,7 +61,7 @@
RefPtr<SkSurface> surface = adoptRef(SkSurface::NewRasterN32Premul(
m_tileImage->width() + expandW, m_tileImage->height() + expandH));
if (!surface)
- return adoptRef(SkShader::MakeColorShader(SK_ColorTRANSPARENT));
+ return adoptRef(SkShader::CreateColorShader(SK_ColorTRANSPARENT));
surface->getCanvas()->clear(SK_ColorTRANSPARENT);
SkPaint paint;
@@ -69,7 +69,7 @@
surface->getCanvas()->drawImage(m_tileImage.get(), 0, 0, &paint);
RefPtr<SkImage> expandedImage = adoptRef(surface->newImageSnapshot());
- return adoptRef(expandedImage->makeShader(tileModeX, tileModeY, &localMatrix));
+ return adoptRef(expandedImage->newShader(tileModeX, tileModeY, &localMatrix));
}
bool ImagePattern::isTextureBacked() const
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Image.cpp ('k') | third_party/WebKit/Source/platform/graphics/Pattern.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698