diff options
author | 2015-04-13 06:12:21 -0700 | |
---|---|---|
committer | 2015-04-13 06:12:21 -0700 | |
commit | 2a0e9f36c6e823d2c0472ef23b4c5a247427807f (patch) | |
tree | 1ded8c714f93efa63c8430a7655403dd32dd6b99 /src/gpu/GrTextBlobCache.h | |
parent | 64b309c35bfddb8382c3e38f1d8ff7efe4098cab (diff) |
Avoid regenerating cached textblobs on integer scrolls
BUG=skia:
Review URL: https://codereview.chromium.org/1062863002
Diffstat (limited to 'src/gpu/GrTextBlobCache.h')
-rw-r--r-- | src/gpu/GrTextBlobCache.h | 7 |
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; |