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

Unified Diff: src/gpu/GrTextBlobCache.cpp

Issue 1249663002: rename BitmapTextBlob and move it to its own file (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 5 years, 5 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/GrTextBlobCache.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextBlobCache.cpp
diff --git a/src/gpu/GrTextBlobCache.cpp b/src/gpu/GrTextBlobCache.cpp
index 6f171779fc3cdbbb390f18aed573c88bed0ed082..b1a13a866f2d240de902617c8b24790f616269f6 100644
--- a/src/gpu/GrTextBlobCache.cpp
+++ b/src/gpu/GrTextBlobCache.cpp
@@ -13,26 +13,26 @@ GrTextBlobCache::~GrTextBlobCache() {
this->freeAll();
}
-GrAtlasTextContext::BitmapTextBlob* GrTextBlobCache::createBlob(int glyphCount, int runCount,
+GrAtlasTextBlob* GrTextBlobCache::createBlob(int glyphCount, int runCount,
size_t maxVASize) {
- // We allocate size for the BitmapTextBlob itself, plus size for the vertices array,
+ // We allocate size for the GrAtlasTextBlob itself, plus size for the vertices array,
// and size for the glyphIds array.
size_t verticesCount = glyphCount * kVerticesPerGlyph * maxVASize;
- size_t size = sizeof(BitmapTextBlob) +
+ size_t size = sizeof(GrAtlasTextBlob) +
verticesCount +
glyphCount * sizeof(GrGlyph**) +
- sizeof(BitmapTextBlob::Run) * runCount;
+ sizeof(GrAtlasTextBlob::Run) * runCount;
- BitmapTextBlob* cacheBlob = SkNEW_PLACEMENT(fPool.allocate(size), BitmapTextBlob);
+ GrAtlasTextBlob* cacheBlob = SkNEW_PLACEMENT(fPool.allocate(size), GrAtlasTextBlob);
// setup offsets for vertices / glyphs
- cacheBlob->fVertices = sizeof(BitmapTextBlob) + reinterpret_cast<unsigned char*>(cacheBlob);
+ cacheBlob->fVertices = sizeof(GrAtlasTextBlob) + reinterpret_cast<unsigned char*>(cacheBlob);
cacheBlob->fGlyphs = reinterpret_cast<GrGlyph**>(cacheBlob->fVertices + verticesCount);
- cacheBlob->fRuns = reinterpret_cast<BitmapTextBlob::Run*>(cacheBlob->fGlyphs + glyphCount);
+ cacheBlob->fRuns = reinterpret_cast<GrAtlasTextBlob::Run*>(cacheBlob->fGlyphs + glyphCount);
// Initialize runs
for (int i = 0; i < runCount; i++) {
- SkNEW_PLACEMENT(&cacheBlob->fRuns[i], BitmapTextBlob::Run);
+ SkNEW_PLACEMENT(&cacheBlob->fRuns[i], GrAtlasTextBlob::Run);
}
cacheBlob->fRunCount = runCount;
cacheBlob->fPool = &fPool;
@@ -40,9 +40,9 @@ GrAtlasTextContext::BitmapTextBlob* GrTextBlobCache::createBlob(int glyphCount,
}
void GrTextBlobCache::freeAll() {
- SkTDynamicHash<BitmapTextBlob, BitmapTextBlob::Key>::Iter iter(&fCache);
+ SkTDynamicHash<GrAtlasTextBlob, GrAtlasTextBlob::Key>::Iter iter(&fCache);
while (!iter.done()) {
- BitmapTextBlob* blob = &(*iter);
+ GrAtlasTextBlob* blob = &(*iter);
fBlobList.remove(blob);
blob->unref();
++iter;
« no previous file with comments | « src/gpu/GrTextBlobCache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698