| OLD | NEW |
| 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 "GrAtlas.h" | 8 #include "GrAtlas.h" |
| 9 #include "GrGpu.h" | 9 #include "GrGpu.h" |
| 10 #include "GrRectanizer.h" | 10 #include "GrRectanizer.h" |
| 11 #include "GrTextStrike.h" | 11 #include "GrTextStrike.h" |
| 12 #include "GrTextStrike_impl.h" | 12 #include "GrTextStrike_impl.h" |
| 13 #include "SkString.h" | 13 #include "SkString.h" |
| 14 | 14 |
| 15 #if SK_DISTANCEFIELD_FONTS | 15 #if SK_DISTANCEFIELD_FONTS |
| 16 #include "edtaa3.h" | 16 #include "edtaa3.h" |
| 17 #endif | 17 #endif |
| 18 | 18 |
| 19 SK_DEFINE_INST_COUNT(GrFontScaler) | |
| 20 SK_DEFINE_INST_COUNT(GrKey) | |
| 21 | |
| 22 /////////////////////////////////////////////////////////////////////////////// | 19 /////////////////////////////////////////////////////////////////////////////// |
| 23 | 20 |
| 24 #define FONT_CACHE_STATS 0 | 21 #define FONT_CACHE_STATS 0 |
| 25 #if FONT_CACHE_STATS | 22 #if FONT_CACHE_STATS |
| 26 static int g_PurgeCount = 0; | 23 static int g_PurgeCount = 0; |
| 27 #endif | 24 #endif |
| 28 | 25 |
| 29 GrFontCache::GrFontCache(GrGpu* gpu) : fGpu(gpu) { | 26 GrFontCache::GrFontCache(GrGpu* gpu) : fGpu(gpu) { |
| 30 gpu->ref(); | 27 gpu->ref(); |
| 31 for (int i = 0; i < kAtlasCount; ++i) { | 28 for (int i = 0; i < kAtlasCount; ++i) { |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 } | 410 } |
| 414 #endif | 411 #endif |
| 415 | 412 |
| 416 if (NULL == plot) { | 413 if (NULL == plot) { |
| 417 return false; | 414 return false; |
| 418 } | 415 } |
| 419 | 416 |
| 420 glyph->fPlot = plot; | 417 glyph->fPlot = plot; |
| 421 return true; | 418 return true; |
| 422 } | 419 } |
| OLD | NEW |