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

Side by Side Diff: src/gpu/GrTextStrike.cpp

Issue 728673002: remove unused kLCD_MaskFormat (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove associated Gr enum Created 6 years, 1 month 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 | « src/gpu/GrFontScaler.cpp ('k') | src/ports/SkFontHost_FreeType.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 2010 Google Inc. 2 * Copyright 2010 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 #include "GrGpu.h" 8 #include "GrGpu.h"
9 #include "GrRectanizer.h" 9 #include "GrRectanizer.h"
10 #include "GrSurfacePriv.h" 10 #include "GrSurfacePriv.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 fGpu->unref(); 51 fGpu->unref();
52 #if FONT_CACHE_STATS 52 #if FONT_CACHE_STATS
53 SkDebugf("Num purges: %d\n", g_PurgeCount); 53 SkDebugf("Num purges: %d\n", g_PurgeCount);
54 #endif 54 #endif
55 } 55 }
56 56
57 static GrPixelConfig mask_format_to_pixel_config(GrMaskFormat format) { 57 static GrPixelConfig mask_format_to_pixel_config(GrMaskFormat format) {
58 static const GrPixelConfig sPixelConfigs[] = { 58 static const GrPixelConfig sPixelConfigs[] = {
59 kAlpha_8_GrPixelConfig, 59 kAlpha_8_GrPixelConfig,
60 kRGB_565_GrPixelConfig, 60 kRGB_565_GrPixelConfig,
61 kSkia8888_GrPixelConfig,
62 kSkia8888_GrPixelConfig 61 kSkia8888_GrPixelConfig
63 }; 62 };
64 SK_COMPILE_ASSERT(SK_ARRAY_COUNT(sPixelConfigs) == kMaskFormatCount, array_s ize_mismatch); 63 SK_COMPILE_ASSERT(SK_ARRAY_COUNT(sPixelConfigs) == kMaskFormatCount, array_s ize_mismatch);
65 64
66 return sPixelConfigs[format]; 65 return sPixelConfigs[format];
67 } 66 }
68 67
69 static int mask_format_to_atlas_index(GrMaskFormat format) { 68 static int mask_format_to_atlas_index(GrMaskFormat format) {
70 static const int sAtlasIndices[] = { 69 static const int sAtlasIndices[] = {
71 GrFontCache::kA8_AtlasType, 70 GrFontCache::kA8_AtlasType,
72 GrFontCache::k565_AtlasType, 71 GrFontCache::k565_AtlasType,
73 GrFontCache::k8888_AtlasType,
74 GrFontCache::k8888_AtlasType 72 GrFontCache::k8888_AtlasType
75 }; 73 };
76 SK_COMPILE_ASSERT(SK_ARRAY_COUNT(sAtlasIndices) == kMaskFormatCount, array_s ize_mismatch); 74 SK_COMPILE_ASSERT(SK_ARRAY_COUNT(sAtlasIndices) == kMaskFormatCount, array_s ize_mismatch);
77 75
78 SkASSERT(sAtlasIndices[format] < GrFontCache::kAtlasCount); 76 SkASSERT(sAtlasIndices[format] < GrFontCache::kAtlasCount);
79 return sAtlasIndices[format]; 77 return sAtlasIndices[format];
80 } 78 }
81 79
82 GrTextStrike* GrFontCache::generateStrike(GrFontScaler* scaler) { 80 GrTextStrike* GrFontCache::generateStrike(GrFontScaler* scaler) {
83 GrTextStrike* strike = SkNEW_ARGS(GrTextStrike, (this, scaler->getKey())); 81 GrTextStrike* strike = SkNEW_ARGS(GrTextStrike, (this, scaler->getKey()));
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 glyph->width(), glyph->height(), 336 glyph->width(), glyph->height(),
339 storage.get(), &glyph->fAtlasLocation) ; 337 storage.get(), &glyph->fAtlasLocation) ;
340 338
341 if (NULL == plot) { 339 if (NULL == plot) {
342 return false; 340 return false;
343 } 341 }
344 342
345 glyph->fPlot = plot; 343 glyph->fPlot = plot;
346 return true; 344 return true;
347 } 345 }
OLDNEW
« no previous file with comments | « src/gpu/GrFontScaler.cpp ('k') | src/ports/SkFontHost_FreeType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698