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

Unified Diff: src/gpu/GrBatchFontCache.cpp

Issue 1244093004: Remove some fields from BitmapTextBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: friendship 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/GrBatchFontCache.h ('k') | src/gpu/GrTextContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBatchFontCache.cpp
diff --git a/src/gpu/GrBatchFontCache.cpp b/src/gpu/GrBatchFontCache.cpp
index aa0526007d39978e046e32bbc0e4286190406f86..6ffcdcf4230bb772b7faa843a9ac31fc271a2055 100644
--- a/src/gpu/GrBatchFontCache.cpp
+++ b/src/gpu/GrBatchFontCache.cpp
@@ -39,7 +39,7 @@ static GrBatchAtlas* make_atlas(GrContext* context, GrPixelConfig config,
bool GrBatchFontCache::initAtlas(GrMaskFormat format) {
int index = MaskFormatToAtlasIndex(format);
if (!fAtlases[index]) {
- GrPixelConfig config = this->getPixelConfig(format);
+ GrPixelConfig config = MaskFormatToPixelConfig(format);
if (kA8_GrMaskFormat == format) {
fAtlases[index] = make_atlas(fContext, config,
GR_FONT_ATLAS_A8_TEXTURE_WIDTH,
@@ -99,17 +99,6 @@ void GrBatchFontCache::freeAll() {
}
}
-GrPixelConfig GrBatchFontCache::getPixelConfig(GrMaskFormat format) const {
- static const GrPixelConfig kPixelConfigs[] = {
- kAlpha_8_GrPixelConfig,
- kRGB_565_GrPixelConfig,
- kSkia8888_GrPixelConfig
- };
- SK_COMPILE_ASSERT(SK_ARRAY_COUNT(kPixelConfigs) == kMaskFormatCount, array_size_mismatch);
-
- return kPixelConfigs[format];
-}
-
void GrBatchFontCache::HandleEviction(GrBatchAtlas::AtlasID id, void* ptr) {
GrBatchFontCache* fontCache = reinterpret_cast<GrBatchFontCache*>(ptr);
« no previous file with comments | « src/gpu/GrBatchFontCache.h ('k') | src/gpu/GrTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698