Index: src/gpu/effects/GrBitmapTextGeoProc.cpp |
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp |
index e8bcd57e6ddd7739061d7f538af588aa7f760b83..c866ae6ca57a1e6954012ce7c8c324617a2e3c4a 100644 |
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp |
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp |
@@ -69,6 +69,12 @@ public: |
fsBuilder->codeAppendf("%s = ", args.fOutputCoverage); |
fsBuilder->appendTextureLookup(args.fSamplers[0], v.fsIn(), kVec2f_GrSLType); |
fsBuilder->codeAppend(";"); |
+ if (cte.maskFormat() == kA565_GrMaskFormat) { |
+ // set alpha to be max of rgb coverage |
+ fsBuilder->codeAppendf("%s.a = max(max(%s.r, %s.g), %s.b);", |
+ args.fOutputCoverage, args.fOutputCoverage, |
+ args.fOutputCoverage, args.fOutputCoverage); |
+ } |
} |
} |