aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextBlobCache.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-04-13 06:12:21 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-13 06:12:21 -0700
commit2a0e9f36c6e823d2c0472ef23b4c5a247427807f (patch)
tree1ded8c714f93efa63c8430a7655403dd32dd6b99 /src/gpu/GrTextBlobCache.h
parent64b309c35bfddb8382c3e38f1d8ff7efe4098cab (diff)
Avoid regenerating cached textblobs on integer scrolls
Diffstat (limited to 'src/gpu/GrTextBlobCache.h')
-rw-r--r--src/gpu/GrTextBlobCache.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gpu/GrTextBlobCache.h b/src/gpu/GrTextBlobCache.h
index 1b5e5b8803..0d0320e00b 100644
--- a/src/gpu/GrTextBlobCache.h
+++ b/src/gpu/GrTextBlobCache.h
@@ -32,6 +32,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;