| Index: third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
|
| index fc03206702862cea7f12a1fdb60d4ec2b1a3cc00..e408ab13a67b32c02a339ae3807b76be83cdb9f0 100644
|
| --- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
|
| @@ -320,6 +320,12 @@ void SVGImage::drawPatternForContainer(GraphicsContext& context,
|
| paint.setShader(MakePaintShaderRecord(tilePicture, SkShader::kRepeat_TileMode,
|
| SkShader::kRepeat_TileMode,
|
| &patternTransform, nullptr));
|
| + // If the shader could not be instantiated (e.g. non-invertible matrix),
|
| + // draw transparent.
|
| + // Note: we can't simply bail, because of arbitrary blend mode.
|
| + if (!paint.getShader())
|
| + paint.setColor(SK_ColorTRANSPARENT);
|
| +
|
| paint.setBlendMode(compositeOp);
|
| paint.setColorFilter(sk_ref_sp(context.getColorFilter()));
|
| context.drawRect(dstRect, paint);
|
|
|