OLD | NEW |
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 #include "GrAtlasTextBatch.h" | 8 #include "GrAtlasTextBatch.h" |
9 | 9 |
10 #include "GrBatchFlushState.h" | 10 #include "GrBatchFlushState.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 run->fOverrideDescriptor->getDesc() : | 140 run->fOverrideDescriptor->getDesc() : |
141 run->fDescriptor.getDesc(); | 141 run->fDescriptor.getDesc(); |
142 if (!*cache || !SkTypeface::Equal(*typeface, run->fTypeface) || | 142 if (!*cache || !SkTypeface::Equal(*typeface, run->fTypeface) || |
143 !((*desc)->equals(*newDesc))) { | 143 !((*desc)->equals(*newDesc))) { |
144 if (*cache) { | 144 if (*cache) { |
145 SkGlyphCache::AttachCache(*cache); | 145 SkGlyphCache::AttachCache(*cache); |
146 } | 146 } |
147 *desc = newDesc; | 147 *desc = newDesc; |
148 *cache = SkGlyphCache::DetachCache(run->fTypeface, *desc); | 148 *cache = SkGlyphCache::DetachCache(run->fTypeface, *desc); |
149 *scaler = GrTextContext::GetGrFontScaler(*cache); | 149 *scaler = GrTextContext::GetGrFontScaler(*cache); |
150 strike = info->strike(); | |
151 *typeface = run->fTypeface; | 150 *typeface = run->fTypeface; |
152 } | 151 } |
153 | 152 |
154 if (regenGlyphs) { | 153 if (regenGlyphs) { |
155 strike = fFontCache->getStrike(*scaler); | 154 strike = fFontCache->getStrike(*scaler); |
156 } else { | 155 } else { |
157 strike = info->strike(); | 156 strike = info->strike(); |
158 } | 157 } |
159 } | 158 } |
160 | 159 |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 return GrDistanceFieldA8TextGeoProc::Create(color, | 559 return GrDistanceFieldA8TextGeoProc::Create(color, |
561 viewMatrix, | 560 viewMatrix, |
562 texture, | 561 texture, |
563 params, | 562 params, |
564 flags, | 563 flags, |
565 this->usesLocalCoords()); | 564 this->usesLocalCoords()); |
566 #endif | 565 #endif |
567 } | 566 } |
568 | 567 |
569 } | 568 } |
OLD | NEW |