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 b913790757bca9c8ffa42f44d0f09f4ad9aca498..69952712da6866efc1f65d7a5fca8b47d22b86b3 100644 |
--- a/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp |
@@ -29,14 +29,17 @@ bool ImagePattern::IsLocalMatrixChanged(const SkMatrix& local_matrix) const { |
return local_matrix != previous_local_matrix_; |
} |
-sk_sp<PaintShader> ImagePattern::CreateShader(const SkMatrix& local_matrix) { |
- if (!tile_image_) |
- return WrapSkShader(SkShader::MakeColorShader(SK_ColorTRANSPARENT)); |
+std::unique_ptr<PaintShader> ImagePattern::CreateShader( |
+ const SkMatrix& local_matrix) { |
+ if (!tile_image_) { |
+ return WTF::MakeUnique<PaintShader>(SK_ColorTRANSPARENT); |
+ } |
if (IsRepeatXY()) { |
// Fast path: for repeatXY we just return a shader from the original image. |
- return MakePaintShaderImage(tile_image_, SkShader::kRepeat_TileMode, |
- SkShader::kRepeat_TileMode, &local_matrix); |
+ return WTF::MakeUnique<PaintShader>(tile_image_, SkShader::kRepeat_TileMode, |
+ SkShader::kRepeat_TileMode, |
+ &local_matrix); |
} |
// Skia does not have a "draw the tile only once" option. Clamp_TileMode |
@@ -73,8 +76,8 @@ sk_sp<PaintShader> ImagePattern::CreateShader(const SkMatrix& local_matrix) { |
SkMatrix adjusted_matrix(local_matrix); |
adjusted_matrix.postTranslate(-border_pixel_x, -border_pixel_y); |
- return MakePaintShaderImage(std::move(tile_image), tile_mode_x, tile_mode_y, |
- &adjusted_matrix); |
+ return WTF::MakeUnique<PaintShader>(std::move(tile_image), tile_mode_x, |
+ tile_mode_y, &adjusted_matrix); |
} |
bool ImagePattern::IsTextureBacked() const { |