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

Unified Diff: src/core/SkDraw.cpp

Issue 79283004: Minor fixes for distance field fonts: (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Replace local identity matrix with global Created 7 years, 1 month 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 | « no previous file | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDraw.cpp
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index aa91df3df557bfc83d2cb5539933400491ac2c3d..0288dee4099060b41a7ef2adc84c81a699b59f2e 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -2012,7 +2012,7 @@ void SkDraw::drawPosText(const char text[], size_t byteLength,
paintRef = &paintCopy;
}
if (procFlags & SkDrawProcs::kSkipBakedGlyphTransform_Flag) {
- ctm = NULL;
+ ctm = &SkMatrix::I();
}
SkAutoGlyphCache autoCache(*paintRef, &fDevice->fLeakyProperties, ctm);
#else
@@ -2036,7 +2036,11 @@ void SkDraw::drawPosText(const char text[], size_t byteLength,
AlignProc alignProc = pick_align_proc(paint.getTextAlign());
SkDraw1Glyph d1g;
SkDraw1Glyph::Proc proc = d1g.init(this, blitter, cache, paint);
+#if SK_DISTANCEFIELD_FONTS
+ TextMapState tms(*ctm, constY);
+#else
TextMapState tms(*fMatrix, constY);
+#endif
TextMapState::Proc tmsProc = tms.pickProc(scalarsPerPosition);
if (cache->isSubpixel()) {
« no previous file with comments | « no previous file | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698