diff options
author | bsalomon <bsalomon@google.com> | 2014-10-14 10:52:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-14 10:52:00 -0700 |
commit | ec87dc64dd40c1a4f80088023c94764caca79bf9 (patch) | |
tree | 2201a1ae32f8ee33f3696018faca03ca514e7500 /src/gpu | |
parent | 585a5fc243e290ad9055ae1439a5e505d1ce7368 (diff) |
Flush text contexts before drawing text as path
BUG=416289
Review URL: https://codereview.chromium.org/636233008
Diffstat (limited to 'src/gpu')
-rwxr-xr-x | src/gpu/GrBitmapTextContext.cpp | 3 | ||||
-rwxr-xr-x | src/gpu/GrDistanceFieldTextContext.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrBitmapTextContext.cpp b/src/gpu/GrBitmapTextContext.cpp index 8620e97b19..fa70d3270b 100755 --- a/src/gpu/GrBitmapTextContext.cpp +++ b/src/gpu/GrBitmapTextContext.cpp @@ -407,6 +407,9 @@ void GrBitmapTextContext::appendGlyph(GrGlyph::PackedID packed, glyph->fPath = path; } + // flush any accumulated draws before drawing this glyph as a path. + this->flush(); + GrContext::AutoMatrix am; SkMatrix translate; translate.setTranslate(SkFixedToScalar(vx - SkIntToFixed(glyph->fBounds.fLeft)), diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp index e10fa4fe7b..9fa0c1d7b8 100755 --- a/src/gpu/GrDistanceFieldTextContext.cpp +++ b/src/gpu/GrDistanceFieldTextContext.cpp @@ -487,6 +487,9 @@ void GrDistanceFieldTextContext::appendGlyph(GrGlyph::PackedID packed, glyph->fPath = path; } + // flush any accumulated draws before drawing this glyph as a path. + this->flush(); + GrContext::AutoMatrix am; SkMatrix ctm; ctm.setScale(fTextRatio, fTextRatio); |