Index: src/core/SkBlitter.cpp |
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp |
index a86881ad3784c9857c7005a3f66fb53ddcaac4ee..cb84ec7d9db0aaa75f8539f7789fba8a5090bc70 100644 |
--- a/src/core/SkBlitter.cpp |
+++ b/src/core/SkBlitter.cpp |
@@ -996,7 +996,8 @@ SkBlitter* SkBlitter::Choose(const SkBitmap& device, |
class SkTransparentShaderContext : public SkShader::Context { |
public: |
SkTransparentShaderContext(const SkShader& shader, const SkShader::ContextRec& rec) |
- : INHERITED(shader, rec) {} |
+ // Override rec with the identity matrix, so it is guaranteed to be invertible. |
+ : INHERITED(shader, SkShader::ContextRec(*rec.fDevice, *rec.fPaint, SkMatrix::I())) {} |
virtual void shadeSpan(int x, int y, SkPMColor colors[], int count) SK_OVERRIDE { |
sk_bzero(colors, count * sizeof(SkPMColor)); |