OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "GrDistanceFieldTextContext.h" | 8 #include "GrDistanceFieldTextContext.h" |
9 #include "GrAtlas.h" | 9 #include "GrAtlas.h" |
10 #include "SkColorFilter.h" | 10 #include "SkColorFilter.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 #ifdef SK_GAMMA_APPLY_TO_A8 | 150 #ifdef SK_GAMMA_APPLY_TO_A8 |
151 U8CPU lum = SkColorSpaceLuminance::computeLuminance(fDevicePropertie
s.fGamma, | 151 U8CPU lum = SkColorSpaceLuminance::computeLuminance(fDevicePropertie
s.fGamma, |
152 filteredColor); | 152 filteredColor); |
153 fCachedEffect.reset(GrDistanceFieldTextureEffect::Create(fCurrTextur
e, | 153 fCachedEffect.reset(GrDistanceFieldTextureEffect::Create(fCurrTextur
e, |
154 params, | 154 params, |
155 fGammaTextu
re, | 155 fGammaTextu
re, |
156 gammaParams
, | 156 gammaParams
, |
157 lum/255.f, | 157 lum/255.f, |
158 flags)); | 158 flags)); |
159 #else | 159 #else |
160 fCachedEffect.reset(GrDistanceFieldTextureEffect::Create(currTexture
, | 160 fCachedEffect.reset(GrDistanceFieldTextureEffect::Create(fCurrTextur
e, |
161 params, fla
gs)); | 161 params, fla
gs)); |
162 #endif | 162 #endif |
163 } | 163 } |
164 fEffectTextureUniqueID = textureUniqueID; | 164 fEffectTextureUniqueID = textureUniqueID; |
165 fEffectColor = filteredColor; | 165 fEffectColor = filteredColor; |
166 fEffectFlags = flags; | 166 fEffectFlags = flags; |
167 } | 167 } |
168 | 168 |
169 } | 169 } |
170 | 170 |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 SkScalarToFixed(x) - (glyph.fAdvanceX >> a
lignShift), | 643 SkScalarToFixed(x) - (glyph.fAdvanceX >> a
lignShift), |
644 SkScalarToFixed(y) - (glyph.fAdvanceY >> a
lignShift), | 644 SkScalarToFixed(y) - (glyph.fAdvanceY >> a
lignShift), |
645 fontScaler); | 645 fontScaler); |
646 } | 646 } |
647 pos += scalarsPerPosition; | 647 pos += scalarsPerPosition; |
648 } | 648 } |
649 } | 649 } |
650 | 650 |
651 this->finish(); | 651 this->finish(); |
652 } | 652 } |
OLD | NEW |