Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Unified Diff: src/gpu/text/GrAtlasTextContext.cpp

Issue 1905683004: Include scaler context flags (gamma and contrast boost) in the text blob cache key. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove leftover changes from earlier version Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/text/GrAtlasTextBlob.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/text/GrAtlasTextContext.cpp
diff --git a/src/gpu/text/GrAtlasTextContext.cpp b/src/gpu/text/GrAtlasTextContext.cpp
index 22fd8a35811438b086ebc9869a7e113ffe3f5ac3..ff62b1f9c51feeac63e946a67988e3f8c2403d13 100644
--- a/src/gpu/text/GrAtlasTextContext.cpp
+++ b/src/gpu/text/GrAtlasTextContext.cpp
@@ -96,6 +96,7 @@ void GrAtlasTextContext::drawTextBlob(GrContext* context, GrDrawContext* dc,
bool canCache = !(skPaint.getPathEffect() ||
(mf && !mf->asABlur(&blurRec)) ||
drawFilter);
+ uint32_t scalerContextFlags = ComputeScalerContextFlags(dc);
GrTextBlobCache* cache = context->getTextBlobCache();
if (canCache) {
@@ -116,6 +117,7 @@ void GrAtlasTextContext::drawTextBlob(GrContext* context, GrDrawContext* dc,
key.fStyle = skPaint.getStyle();
key.fHasBlur = SkToBool(mf);
key.fCanonicalColor = canonicalColor;
+ key.fScalerContextFlags = scalerContextFlags;
cacheBlob.reset(SkSafeRef(cache->find(key)));
}
@@ -126,8 +128,6 @@ void GrAtlasTextContext::drawTextBlob(GrContext* context, GrDrawContext* dc,
return;
}
- uint32_t scalerContextFlags = ComputeScalerContextFlags(dc);
-
if (cacheBlob) {
if (cacheBlob->mustRegenerate(skPaint, grPaint.getColor(), blurRec, viewMatrix, x, y)) {
// We have to remake the blob because changes may invalidate our masks.
« no previous file with comments | « src/gpu/text/GrAtlasTextBlob.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698