| 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 "GrGpu.h" | 8 #include "GrGpu.h" |
| 9 #include "GrRectanizer.h" | 9 #include "GrRectanizer.h" |
| 10 #include "GrTextStrike.h" | 10 #include "GrTextStrike.h" |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 #endif | 213 #endif |
| 214 | 214 |
| 215 /* | 215 /* |
| 216 The text strike is specific to a given font/style/matrix setup, which is | 216 The text strike is specific to a given font/style/matrix setup, which is |
| 217 represented by the GrHostFontScaler object we are given in getGlyph(). | 217 represented by the GrHostFontScaler object we are given in getGlyph(). |
| 218 | 218 |
| 219 We map a 32bit glyphID to a GrGlyph record, which in turn points to a | 219 We map a 32bit glyphID to a GrGlyph record, which in turn points to a |
| 220 atlas and a position within that texture. | 220 atlas and a position within that texture. |
| 221 */ | 221 */ |
| 222 | 222 |
| 223 GrTextStrike::GrTextStrike(GrFontCache* cache, const GrKey* key, | 223 GrTextStrike::GrTextStrike(GrFontCache* cache, const GrFontDescKey* key, |
| 224 GrMaskFormat format, | 224 GrMaskFormat format, |
| 225 GrAtlas* atlas) : fPool(64) { | 225 GrAtlas* atlas) : fPool(64) { |
| 226 fFontScalerKey = key; | 226 fFontScalerKey = key; |
| 227 fFontScalerKey->ref(); | 227 fFontScalerKey->ref(); |
| 228 | 228 |
| 229 fFontCache = cache; // no need to ref, it won't go away before we do | 229 fFontCache = cache; // no need to ref, it won't go away before we do |
| 230 fAtlas = atlas; // no need to ref, it won't go away before we do | 230 fAtlas = atlas; // no need to ref, it won't go away before we do |
| 231 | 231 |
| 232 fMaskFormat = format; | 232 fMaskFormat = format; |
| 233 | 233 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 glyph->height(), storage.get(), | 318 glyph->height(), storage.get(), |
| 319 &glyph->fAtlasLocation); | 319 &glyph->fAtlasLocation); |
| 320 | 320 |
| 321 if (NULL == plot) { | 321 if (NULL == plot) { |
| 322 return false; | 322 return false; |
| 323 } | 323 } |
| 324 | 324 |
| 325 glyph->fPlot = plot; | 325 glyph->fPlot = plot; |
| 326 return true; | 326 return true; |
| 327 } | 327 } |
| OLD | NEW |