aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrAtlasTextBlob.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/text/GrAtlasTextBlob.h')
-rw-r--r--src/gpu/text/GrAtlasTextBlob.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/gpu/text/GrAtlasTextBlob.h b/src/gpu/text/GrAtlasTextBlob.h
index 788eaba77b..d9083b2f56 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;