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

Unified Diff: src/gpu/text/GrAtlasTextBlob.h

Issue 1983353003: Attempt to improve lifetime management of SkGlyphCache in Ganesh atlas text code. (Closed) Base URL: https://skia.googlesource.com/skia.git@fixtest
Patch Set: Updated to only compare descriptors Created 4 years, 7 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/batches/GrAtlasTextBatch.cpp ('k') | src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/text/GrAtlasTextBlob.h
diff --git a/src/gpu/text/GrAtlasTextBlob.h b/src/gpu/text/GrAtlasTextBlob.h
index 788eaba77bfb4ffffde2e84ddd994a5475acd4bf..d9083b2f568ed3f48112e64ab140d31057ad617d 100644
--- a/src/gpu/text/GrAtlasTextBlob.h
+++ b/src/gpu/text/GrAtlasTextBlob.h
@@ -256,12 +256,15 @@ public:
this->setupViewMatrix(viewMatrix, x, y);
}
+ /**
+ * Consecutive calls to regenInBatch often use the same SkGlyphCache. If the same instance of
+ * SkAutoGlyphCache is passed to multiple calls of regenInBatch then it can save the cost of
+ * multiple detach/attach operations of SkGlyphCache.
+ */
void regenInBatch(GrDrawBatch::Target* target, GrBatchFontCache* fontCache,
- GrBlobRegenHelper *helper, int run, int subRun, SkGlyphCache** cache,
- SkTypeface** typeface, const SkDescriptor** desc, size_t vertexStride,
- const SkMatrix& viewMatrix, SkScalar x, SkScalar y,
- GrColor color,
- void** vertices, size_t* byteCount, int* glyphCount);
+ GrBlobRegenHelper *helper, int run, int subRun, SkAutoGlyphCache*,
+ size_t vertexStride, const SkMatrix& viewMatrix, SkScalar x, SkScalar y,
+ GrColor color, void** vertices, size_t* byteCount, int* glyphCount);
const Key& key() const { return fKey; }
@@ -489,9 +492,9 @@ private:
void regenInBatch(GrDrawBatch::Target* target,
GrBatchFontCache* fontCache,
GrBlobRegenHelper* helper,
- Run* run, Run::SubRunInfo* info, SkGlyphCache** cache,
- SkTypeface** typeface, const SkDescriptor** desc,
- int glyphCount, size_t vertexStride,
+ Run* run, Run::SubRunInfo* info,
+ SkAutoGlyphCache*, int glyphCount,
+ size_t vertexStride,
GrColor color, SkScalar transX,
SkScalar transY) const;
« no previous file with comments | « src/gpu/batches/GrAtlasTextBatch.cpp ('k') | src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698