Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: src/gpu/GrBitmapTextContext.cpp

Issue 793013003: Remove the low hanging fruit with coord change matrices (Closed) Base URL: https://skia.googlesource.com/skia.git@more-ccm-cleanup
Patch Set: adding tests to ignore Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBitmapTextContext.cpp
diff --git a/src/gpu/GrBitmapTextContext.cpp b/src/gpu/GrBitmapTextContext.cpp
index 921c198eebd2e9b2c6e0ff1b4a30a3e7daa002cb..732a514c4fb2ef38983d69059afa68328ffb0b2b 100755
--- a/src/gpu/GrBitmapTextContext.cpp
+++ b/src/gpu/GrBitmapTextContext.cpp
@@ -430,6 +430,7 @@ void GrBitmapTextContext::appendGlyph(GrGlyph::PackedID packed,
}
}
+ // If the glyph is too large we fall back to paths
if (NULL == glyph->fPlot && !uploadGlyph(glyph, scaler)) {
if (NULL == glyph->fPath) {
SkPath* path = SkNEW(SkPath);
@@ -447,10 +448,10 @@ void GrBitmapTextContext::appendGlyph(GrGlyph::PackedID packed,
SkMatrix translate;
translate.setTranslate(SkFixedToScalar(vx - SkIntToFixed(glyph->fBounds.fLeft)),
SkFixedToScalar(vy - SkIntToFixed(glyph->fBounds.fTop)));
- GrPaint tmpPaint(fPaint);
- tmpPaint.localCoordChange(translate);
+ SkPath tmpPath(*glyph->fPath);
+ tmpPath.transform(translate);
GrStrokeInfo strokeInfo(SkStrokeRec::kFill_InitStyle);
- fContext->drawPath(tmpPaint, translate, *glyph->fPath, strokeInfo);
+ fContext->drawPath(fPaint, SkMatrix::I(), tmpPath, strokeInfo);
// remove this glyph from the vertices we need to allocate
fTotalVertexCount -= kVerticesPerGlyph;
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698