| Index: third_party/WebKit/Source/platform/graphics/Image.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/Image.cpp b/third_party/WebKit/Source/platform/graphics/Image.cpp
|
| index bcefc90b344770a2a778facfb82707b42bc8b3a5..21205cf4ff49aa335608275f949cba3bdca724e3 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/Image.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/Image.cpp
|
| @@ -270,4 +270,17 @@ bool Image::isTextureBacked()
|
| return image ? image->isTextureBacked() : false;
|
| }
|
|
|
| +bool Image::applyShader(SkPaint& paint, const SkMatrix* localMatrix)
|
| +{
|
| + // Default shader impl: attempt to build a shader based on the current frame SkImage.
|
| + RefPtr<SkImage> image = imageForCurrentFrame();
|
| + if (!image)
|
| + return false;
|
| +
|
| + paint.setShader(
|
| + image->makeShader(SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, localMatrix));
|
| +
|
| + return true;
|
| +}
|
| +
|
| } // namespace blink
|
|
|