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

Unified Diff: src/gpu/GrAtlasTextContext.cpp

Issue 1050113004: Adding bulk plot reffer to cached textblobs (Closed) Base URL: https://skia.googlesource.com/skia.git@atlastext
Patch Set: rebase Created 5 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/GrAtlasTextContext.h ('k') | src/gpu/GrBatchAtlas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextContext.cpp
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index 08e6a9a25ef1c19b0ee54c3cdedfd105aec6dd65..38edc8e55881bc7e8cb7251303f14821b9f43b98 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -821,6 +821,7 @@ public:
GrBatchTextStrike* strike = NULL;
bool brokenRun = false;
if (regenerateTextureCoords) {
+ info.fBulkUseToken.reset();
desc = run.fDescriptor.getDesc();
cache = SkGlyphCache::DetachCache(run.fTypeface, desc);
scaler = GrTextContext::GetGrFontScaler(cache);
@@ -846,8 +847,8 @@ public:
scaler);
SkASSERT(success);
}
-
- fFontCache->setGlyphRefToken(glyph, batchTarget->currentToken());
+ fFontCache->addGlyphToBulkAndSetUseToken(&info.fBulkUseToken, glyph,
+ batchTarget->currentToken());
// Texture coords are the last vertex attribute so we get a pointer to the
// first one and then map with stride in regenerateTextureCoords
@@ -876,6 +877,12 @@ public:
}
} else {
instancesToFlush += glyphCount;
+
+ // set use tokens for all of the glyphs in our subrun. This is only valid if we
+ // have a valid atlas generation
+ fFontCache->setUseTokenBulk(info.fBulkUseToken,
+ batchTarget->currentToken(),
+ fMaskFormat);
}
// now copy all vertices
« no previous file with comments | « src/gpu/GrAtlasTextContext.h ('k') | src/gpu/GrBatchAtlas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698