Allow LCD text to batch across colorchanges. This will always use
color vertices, even when we can't batch across color changes
BUG=skia:
Review URL: https://codereview.chromium.org/1502253003
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
index a8643b0..6fd3538 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
@@ -144,9 +144,8 @@
this->initClassID<GrBitmapTextGeoProc>();
fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertexAttribType));
- // TODO we could think about removing this attribute if color is ignored, but unfortunately
- // we don't do text positioning in batch, so we can't quite do that yet.
- bool hasVertexColor = kA8_GrMaskFormat == fMaskFormat;
+ bool hasVertexColor = kA8_GrMaskFormat == fMaskFormat ||
+ kA565_GrMaskFormat == fMaskFormat;
if (hasVertexColor) {
fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVertexAttribType));
}