| Index: src/gpu/GrDistanceFieldTextContext.cpp
|
| diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp
|
| index 3b5bd304d3036035840563e7c7f7b08b9a782d79..7a3711889f05089f0d5f9ecdefaa23e7df3e3ad9 100755
|
| --- a/src/gpu/GrDistanceFieldTextContext.cpp
|
| +++ b/src/gpu/GrDistanceFieldTextContext.cpp
|
| @@ -607,8 +607,8 @@
|
|
|
| void GrDistanceFieldTextContext::drawPosText(const GrPaint& paint, const SkPaint& skPaint,
|
| const char text[], size_t byteLength,
|
| - const SkScalar pos[], SkScalar constY,
|
| - int scalarsPerPosition) {
|
| + const SkScalar pos[], int scalarsPerPosition,
|
| + const SkPoint& offset) {
|
|
|
| SkASSERT(byteLength == 0 || text != NULL);
|
| SkASSERT(1 == scalarsPerPosition || 2 == scalarsPerPosition);
|
| @@ -636,8 +636,8 @@
|
| const SkGlyph& glyph = glyphCacheProc(cache, &text, 0, 0);
|
|
|
| if (glyph.fWidth) {
|
| - SkScalar x = pos[0];
|
| - SkScalar y = scalarsPerPosition == 1 ? constY : pos[1];
|
| + SkScalar x = offset.x() + pos[0];
|
| + SkScalar y = offset.y() + (2 == scalarsPerPosition ? pos[1] : 0);
|
|
|
| this->drawPackedGlyph(GrGlyph::Pack(glyph.getGlyphID(),
|
| glyph.getSubXFixed(),
|
| @@ -655,8 +655,8 @@
|
| const SkGlyph& glyph = glyphCacheProc(cache, &text, 0, 0);
|
|
|
| if (glyph.fWidth) {
|
| - SkScalar x = pos[0];
|
| - SkScalar y = scalarsPerPosition == 1 ? constY : pos[1];
|
| + SkScalar x = offset.x() + pos[0];
|
| + SkScalar y = offset.y() + (2 == scalarsPerPosition ? pos[1] : 0);
|
|
|
| this->drawPackedGlyph(GrGlyph::Pack(glyph.getGlyphID(),
|
| glyph.getSubXFixed(),
|
|
|