Index: src/gpu/GrTextBlobCache.h |
diff --git a/src/gpu/GrTextBlobCache.h b/src/gpu/GrTextBlobCache.h |
index 1776c69e7ae11b076bd38e1e9b4f680dd511197e..ca12411f7d3c0b2112a68342e8361405408d93f1 100644 |
--- a/src/gpu/GrTextBlobCache.h |
+++ b/src/gpu/GrTextBlobCache.h |
@@ -14,8 +14,6 @@ |
class GrTextBlobCache { |
public: |
- typedef GrAtlasTextContext::BitmapTextBlob BitmapTextBlob; |
- |
/** |
* The callback function used by the cache when it is still over budget after a purge. The |
* passed in 'data' is the same 'data' handed to setOverbudgetCallback. |
@@ -31,24 +29,24 @@ public: |
~GrTextBlobCache(); |
// creates an uncached blob |
- BitmapTextBlob* createBlob(int glyphCount, int runCount, size_t maxVASize); |
- BitmapTextBlob* createBlob(const SkTextBlob* blob, size_t maxVAStride) { |
+ GrAtlasTextBlob* createBlob(int glyphCount, int runCount, size_t maxVASize); |
+ GrAtlasTextBlob* createBlob(const SkTextBlob* blob, size_t maxVAStride) { |
int glyphCount = 0; |
int runCount = 0; |
BlobGlyphCount(&glyphCount, &runCount, blob); |
- BitmapTextBlob* cacheBlob = this->createBlob(glyphCount, runCount, maxVAStride); |
+ GrAtlasTextBlob* cacheBlob = this->createBlob(glyphCount, runCount, maxVAStride); |
return cacheBlob; |
} |
- BitmapTextBlob* createCachedBlob(const SkTextBlob* blob, |
- const BitmapTextBlob::Key& key, |
+ GrAtlasTextBlob* createCachedBlob(const SkTextBlob* blob, |
+ const GrAtlasTextBlob::Key& key, |
const SkMaskFilter::BlurRec& blurRec, |
const SkPaint& paint, |
size_t maxVAStride) { |
int glyphCount = 0; |
int runCount = 0; |
BlobGlyphCount(&glyphCount, &runCount, blob); |
- BitmapTextBlob* cacheBlob = this->createBlob(glyphCount, runCount, maxVAStride); |
+ GrAtlasTextBlob* cacheBlob = this->createBlob(glyphCount, runCount, maxVAStride); |
cacheBlob->fKey = key; |
if (key.fHasBlur) { |
cacheBlob->fBlurRec = blurRec; |
@@ -62,17 +60,17 @@ public: |
return cacheBlob; |
} |
- BitmapTextBlob* find(const BitmapTextBlob::Key& key) { |
+ GrAtlasTextBlob* find(const GrAtlasTextBlob::Key& key) { |
return fCache.find(key); |
} |
- void remove(BitmapTextBlob* blob) { |
+ void remove(GrAtlasTextBlob* blob) { |
fCache.remove(blob->fKey); |
fBlobList.remove(blob); |
blob->unref(); |
} |
- void add(BitmapTextBlob* blob) { |
+ void add(GrAtlasTextBlob* blob) { |
fCache.add(blob); |
fBlobList.addToHead(blob); |
@@ -80,7 +78,7 @@ public: |
if (fPool.size() > kBudget) { |
BitmapBlobList::Iter iter; |
iter.init(fBlobList, BitmapBlobList::Iter::kTail_IterStart); |
- BitmapTextBlob* lruBlob = iter.get(); |
+ GrAtlasTextBlob* lruBlob = iter.get(); |
SkASSERT(lruBlob); |
while (fPool.size() > kBudget && (lruBlob = iter.get()) && lruBlob != blob) { |
fCache.remove(lruBlob->fKey); |
@@ -106,7 +104,7 @@ public: |
} |
} |
- void makeMRU(BitmapTextBlob* blob) { |
+ void makeMRU(GrAtlasTextBlob* blob) { |
if (fBlobList.head() == blob) { |
return; |
} |
@@ -126,7 +124,7 @@ private: |
} |
} |
- typedef SkTInternalLList<BitmapTextBlob> BitmapBlobList; |
+ typedef SkTInternalLList<GrAtlasTextBlob> BitmapBlobList; |
// Budget was chosen to be ~4 megabytes. The min alloc and pre alloc sizes in the pool are |
// based off of the largest cached textblob I have seen in the skps(a couple of kilobytes). |
@@ -134,7 +132,7 @@ private: |
static const int kMinGrowthSize = 1 << 17; |
static const int kBudget = 1 << 22; |
BitmapBlobList fBlobList; |
- SkTDynamicHash<BitmapTextBlob, BitmapTextBlob::Key> fCache; |
+ SkTDynamicHash<GrAtlasTextBlob, GrAtlasTextBlob::Key> fCache; |
GrMemoryPool fPool; |
PFOverBudgetCB fCallback; |
void* fData; |