diff options
author | 2015-05-11 13:04:28 -0700 | |
---|---|---|
committer | 2015-05-11 13:04:28 -0700 | |
commit | e4cee1f283c435618343f0c7b298207d5a9a3e1c (patch) | |
tree | f8e161fa7b6791deddb627f011ba2af2ba16c8fc /src/gpu/GrAtlasTextContext.cpp | |
parent | 0e9ac4a28b8fbfcaea1f83c4bd5fe5a9a1aecac3 (diff) |
fix for cached textblobs look garbled
BUG=skia:
Review URL: https://codereview.chromium.org/1135813007
Diffstat (limited to 'src/gpu/GrAtlasTextContext.cpp')
-rw-r--r-- | src/gpu/GrAtlasTextContext.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp index c908137477..227ba1f65e 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); |