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 "GrDrawTarget.h" | 10 #include "GrDrawTarget.h" |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 } | 365 } |
366 | 366 |
367 x -= alignX; | 367 x -= alignX; |
368 y -= alignY; | 368 y -= alignY; |
369 } | 369 } |
370 | 370 |
371 SkFixed fx = SkScalarToFixed(x) + SK_FixedHalf; | 371 SkFixed fx = SkScalarToFixed(x) + SK_FixedHalf; |
372 SkFixed fy = SkScalarToFixed(y) + SK_FixedHalf; | 372 SkFixed fy = SkScalarToFixed(y) + SK_FixedHalf; |
373 SkFixed fixedScale = SkScalarToFixed(sizeRatio); | 373 SkFixed fixedScale = SkScalarToFixed(sizeRatio); |
374 while (text < stop) { | 374 while (text < stop) { |
375 const SkGlyph& glyph = glyphCacheProc(cache, &text, fx, fy); | 375 const SkGlyph& glyph = glyphCacheProc(cache, &text, 0, 0); |
376 | 376 |
377 if (glyph.fWidth) { | 377 if (glyph.fWidth) { |
378 this->drawPackedGlyph(GrGlyph::Pack(glyph.getGlyphID(), | 378 this->drawPackedGlyph(GrGlyph::Pack(glyph.getGlyphID(), |
379 glyph.getSubXFixed(), | 379 glyph.getSubXFixed(), |
380 glyph.getSubYFixed()), | 380 glyph.getSubYFixed()), |
381 SkFixedFloorToFixed(fx), | 381 SkFixedFloorToFixed(fx), |
382 SkFixedFloorToFixed(fy), | 382 SkFixedFloorToFixed(fy), |
383 fontScaler); | 383 fontScaler); |
384 } | 384 } |
385 | 385 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 SkScalarToFixed(y) - (glyph.fAdvanceY >> a
lignShift) | 449 SkScalarToFixed(y) - (glyph.fAdvanceY >> a
lignShift) |
450 + SK_FixedHalf, //d1g.fHalfSampleY, | 450 + SK_FixedHalf, //d1g.fHalfSampleY, |
451 fontScaler); | 451 fontScaler); |
452 } | 452 } |
453 pos += scalarsPerPosition; | 453 pos += scalarsPerPosition; |
454 } | 454 } |
455 } | 455 } |
456 | 456 |
457 this->finish(); | 457 this->finish(); |
458 } | 458 } |
OLD | NEW |