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

Unified Diff: src/gpu/GrBatchFontCache.h

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/GrAtlasTextContext.cpp ('k') | src/gpu/GrBatchFontCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBatchFontCache.h
diff --git a/src/gpu/GrBatchFontCache.h b/src/gpu/GrBatchFontCache.h
index 9804750f17ab3a054c4a31ee7df2fb1a94d47d63..2b625291994ff2610f804e222d5879cc4695e25d 100644
--- a/src/gpu/GrBatchFontCache.h
+++ b/src/gpu/GrBatchFontCache.h
@@ -147,11 +147,20 @@ public:
return this->getAtlas(format)->atlasGeneration();
}
- GrPixelConfig getPixelConfig(GrMaskFormat) const;
-
void dump() const;
private:
+ static GrPixelConfig MaskFormatToPixelConfig(GrMaskFormat format) {
+ 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];
+ }
+
// There is a 1:1 mapping between GrMaskFormats and atlas indices
static int MaskFormatToAtlasIndex(GrMaskFormat format) {
static const int sAtlasIndices[] = {
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrBatchFontCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698