Index: src/gpu/GrAtlasTextContext.cpp |
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp |
index c908137477672544f727e5ab31839a90c6547b1c..227ba1f65ed493e2a4998903a39aae297db74b5c 100644 |
--- a/src/gpu/GrAtlasTextContext.cpp |
+++ b/src/gpu/GrAtlasTextContext.cpp |
@@ -366,12 +366,18 @@ void GrAtlasTextContext::drawTextBlob(GrRenderTarget* rt, const GrClip& clip, |
if (canCache) { |
bool hasLCD = HasLCD(blob); |
+ |
+ // We canonicalize all non-lcd draws to use kUnknown_SkPixelGeometry |
+ SkPixelGeometry pixelGeometry = hasLCD ? fDeviceProperties.pixelGeometry() : |
+ kUnknown_SkPixelGeometry; |
+ |
// TODO we want to figure out a way to be able to use the canonical color on LCD text, |
// see the note on ComputeCanonicalColor above. We pick a dummy value for LCD text to |
// ensure we always match the same key |
GrColor canonicalColor = hasLCD ? SK_ColorTRANSPARENT : |
ComputeCanonicalColor(skPaint, hasLCD); |
+ key.fPixelGeometry = pixelGeometry; |
key.fUniqueID = blob->uniqueID(); |
key.fStyle = skPaint.getStyle(); |
key.fHasBlur = SkToBool(mf); |