aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-10-14 10:52:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-14 10:52:00 -0700
commitec87dc64dd40c1a4f80088023c94764caca79bf9 (patch)
tree2201a1ae32f8ee33f3696018faca03ca514e7500 /src
parent585a5fc243e290ad9055ae1439a5e505d1ce7368 (diff)
Flush text contexts before drawing text as path
Diffstat (limited to 'src')
-rwxr-xr-xsrc/gpu/GrBitmapTextContext.cpp3
-rwxr-xr-xsrc/gpu/GrDistanceFieldTextContext.cpp3
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);