Index: src/effects/SkColorMatrixFilter.cpp |
diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp |
index bb85485050813e776aa1ecd6489819cbc5aef79c..23be874b97121ef0f17667475d77b4471c33ecb9 100644 |
--- a/src/effects/SkColorMatrixFilter.cpp |
+++ b/src/effects/SkColorMatrixFilter.cpp |
@@ -424,6 +424,7 @@ public: |
builder->getUniformCStr(fMatrixHandle), |
inputColor, |
builder->getUniformCStr(fVectorHandle)); |
+ builder->fsCodeAppendf("\t%s = clamp(%s, 0.0, 1.0);\n", outputColor, outputColor); |
builder->fsCodeAppendf("\t%s.rgb *= %s.a;\n", outputColor, outputColor); |
} |