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

Unified Diff: src/core/SkBlitter.cpp

Issue 315743003: Use Identity matrix for SkTransparentShader. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698