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

Unified Diff: src/gpu/GrTextBlobCache.h

Issue 1062863002: Avoid regenerating cached textblobs on integer scrolls (Closed) Base URL: https://skia.googlesource.com/skia.git@atlastextcache
Patch Set: feedback inc 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
« src/gpu/GrAtlasTextContext.cpp ('K') | « src/gpu/GrAtlasTextContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextBlobCache.h
diff --git a/src/gpu/GrTextBlobCache.h b/src/gpu/GrTextBlobCache.h
index 7a2b2a79a17ade040c3c93106b5b22cf8c590015..4bf07f4830f204c10a2f5fdaa04238e8b993aa2d 100644
--- a/src/gpu/GrTextBlobCache.h
+++ b/src/gpu/GrTextBlobCache.h
@@ -21,6 +21,13 @@ public:
// creates an uncached blob
BitmapTextBlob* createBlob(int glyphCount, int runCount, size_t maxVASize);
+ BitmapTextBlob* createBlob(const SkTextBlob* blob, size_t maxVAStride) {
+ int glyphCount = 0;
+ int runCount = 0;
+ BlobGlyphCount(&glyphCount, &runCount, blob);
+ BitmapTextBlob* cacheBlob = this->createBlob(glyphCount, runCount, maxVAStride);
+ return cacheBlob;
+ }
BitmapTextBlob* createCachedBlob(const SkTextBlob* blob, size_t maxVAStride) {
int glyphCount = 0;
« src/gpu/GrAtlasTextContext.cpp ('K') | « src/gpu/GrAtlasTextContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698