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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 #ifdef SK_GAMMA_APPLY_TO_A8 | 152 #ifdef SK_GAMMA_APPLY_TO_A8 |
153 U8CPU lum = SkColorSpaceLuminance::computeLuminance(fDevicePropertie
s.fGamma, | 153 U8CPU lum = SkColorSpaceLuminance::computeLuminance(fDevicePropertie
s.fGamma, |
154 filteredColor); | 154 filteredColor); |
155 fCachedEffect.reset(GrDistanceFieldTextureEffect::Create(currTexture
, | 155 fCachedEffect.reset(GrDistanceFieldTextureEffect::Create(currTexture
, |
156 params, | 156 params, |
157 fGammaTextu
re, | 157 fGammaTextu
re, |
158 gammaParams
, | 158 gammaParams
, |
159 lum/255.f, | 159 lum/255.f, |
160 flags)); | 160 flags)); |
161 #else | 161 #else |
162 fCachedEffect.reset(GrDistanceFieldTextureEffect::Create(fCurrTextur
e, | 162 fCachedEffect.reset(GrDistanceFieldTextureEffect::Create(currTexture
, |
163 params, fla
gs)); | 163 params, fla
gs)); |
164 #endif | 164 #endif |
165 } | 165 } |
166 fEffectTextureUniqueID = textureUniqueID; | 166 fEffectTextureUniqueID = textureUniqueID; |
167 fEffectColor = filteredColor; | 167 fEffectColor = filteredColor; |
168 fEffectFlags = flags; | 168 fEffectFlags = flags; |
169 } | 169 } |
170 | 170 |
171 } | 171 } |
172 | 172 |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 SkScalarToFixed(x) - (glyph.fAdvanceX >> a
lignShift), | 634 SkScalarToFixed(x) - (glyph.fAdvanceX >> a
lignShift), |
635 SkScalarToFixed(y) - (glyph.fAdvanceY >> a
lignShift), | 635 SkScalarToFixed(y) - (glyph.fAdvanceY >> a
lignShift), |
636 fontScaler); | 636 fontScaler); |
637 } | 637 } |
638 pos += scalarsPerPosition; | 638 pos += scalarsPerPosition; |
639 } | 639 } |
640 } | 640 } |
641 | 641 |
642 this->finish(); | 642 this->finish(); |
643 } | 643 } |
OLD | NEW |