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

Side by Side Diff: src/gpu/text/GrBatchFontCache.h

Issue 2128583007: Revert of Use sRGB pixel config for ARGB masks (color emoji) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/gpu/text/GrBatchFontCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrBatchFontCache_DEFINED 8 #ifndef GrBatchFontCache_DEFINED
9 #define GrBatchFontCache_DEFINED 9 #define GrBatchFontCache_DEFINED
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 int log2Width(GrMaskFormat format) { return fAtlasConfigs[format].fLog2Width ; } 179 int log2Width(GrMaskFormat format) { return fAtlasConfigs[format].fLog2Width ; }
180 int log2Height(GrMaskFormat format) { return fAtlasConfigs[format].fLog2Heig ht; } 180 int log2Height(GrMaskFormat format) { return fAtlasConfigs[format].fLog2Heig ht; }
181 181
182 /////////////////////////////////////////////////////////////////////////// 182 ///////////////////////////////////////////////////////////////////////////
183 // Functions intended debug only 183 // Functions intended debug only
184 void dump() const; 184 void dump() const;
185 185
186 void setAtlasSizes_ForTesting(const GrBatchAtlasConfig configs[3]); 186 void setAtlasSizes_ForTesting(const GrBatchAtlasConfig configs[3]);
187 187
188 private: 188 private:
189 static GrPixelConfig MaskFormatToPixelConfig(GrMaskFormat format, const GrCa ps& caps) { 189 static GrPixelConfig MaskFormatToPixelConfig(GrMaskFormat format) {
190 static const GrPixelConfig kPixelConfigs[] = { 190 static const GrPixelConfig kPixelConfigs[] = {
191 kAlpha_8_GrPixelConfig, 191 kAlpha_8_GrPixelConfig,
192 kRGB_565_GrPixelConfig, 192 kRGB_565_GrPixelConfig,
193 caps.srgbSupport() ? kSkiaGamma8888_GrPixelConfig : kSkia8888_GrPixe lConfig 193 kSkia8888_GrPixelConfig
194 }; 194 };
195 static_assert(SK_ARRAY_COUNT(kPixelConfigs) == kMaskFormatCount, "array_ size_mismatch"); 195 static_assert(SK_ARRAY_COUNT(kPixelConfigs) == kMaskFormatCount, "array_ size_mismatch");
196 196
197 return kPixelConfigs[format]; 197 return kPixelConfigs[format];
198 } 198 }
199 199
200 // There is a 1:1 mapping between GrMaskFormats and atlas indices 200 // There is a 1:1 mapping between GrMaskFormats and atlas indices
201 static int MaskFormatToAtlasIndex(GrMaskFormat format) { 201 static int MaskFormatToAtlasIndex(GrMaskFormat format) {
202 static const int sAtlasIndices[] = { 202 static const int sAtlasIndices[] = {
203 kA8_GrMaskFormat, 203 kA8_GrMaskFormat,
(...skipping 24 matching lines...) Expand all
228 228
229 using StrikeHash = SkTDynamicHash<GrBatchTextStrike, SkDescriptor>; 229 using StrikeHash = SkTDynamicHash<GrBatchTextStrike, SkDescriptor>;
230 GrContext* fContext; 230 GrContext* fContext;
231 StrikeHash fCache; 231 StrikeHash fCache;
232 GrBatchAtlas* fAtlases[kMaskFormatCount]; 232 GrBatchAtlas* fAtlases[kMaskFormatCount];
233 GrBatchTextStrike* fPreserveStrike; 233 GrBatchTextStrike* fPreserveStrike;
234 GrBatchAtlasConfig fAtlasConfigs[kMaskFormatCount]; 234 GrBatchAtlasConfig fAtlasConfigs[kMaskFormatCount];
235 }; 235 };
236 236
237 #endif 237 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/text/GrBatchFontCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698