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

Unified Diff: src/core/SkFindAndPlaceGlyph.h

Issue 1740163002: Improve horizontal baseline detection. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Just the bug fixes first. Created 4 years, 10 months 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/core/SkPaint.cpp » ('j') | src/core/SkScalerContext.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkFindAndPlaceGlyph.h
diff --git a/src/core/SkFindAndPlaceGlyph.h b/src/core/SkFindAndPlaceGlyph.h
index 78a02c0e4dc4cdbab3063d07710be743e4741e35..18b93f70a466291cc1f44989f3d75463442ad919 100644
--- a/src/core/SkFindAndPlaceGlyph.h
+++ b/src/core/SkFindAndPlaceGlyph.h
@@ -587,9 +587,8 @@ inline void SkFindAndPlaceGlyph::ProcessPosText(
SkPaint::Align textAlignment,
SkGlyphCache* cache, ProcessOneGlyph&& processOneGlyph) {
- SkAxisAlignment axisAlignment = SkComputeAxisAlignmentForHText(matrix);
+ SkAxisAlignment axisAlignment = cache->getScalerContext()->computeAxisAlignmentForHText();
uint32_t mtype = matrix.getType();
-
LookupGlyph glyphFinder(textEncoding, cache);
// Specialized code for handling the most common case for blink. The while loop is totally
@@ -710,7 +709,8 @@ inline void SkFindAndPlaceGlyph::ProcessText(
GlyphFindAndPlace<ProcessOneGlyph> findAndPosition{
[&](typename GlyphFindAndPlace<ProcessOneGlyph>::Variants* to_init) {
if (cache->isSubpixel()) {
- SkAxisAlignment axisAlignment = SkComputeAxisAlignmentForHText(matrix);
+ SkAxisAlignment axisAlignment =
+ cache->getScalerContext()->computeAxisAlignmentForHText();
InitSubpixel<ProcessOneGlyph, SkPaint::kLeft_Align>(
to_init, axisAlignment, glyphFinder);
} else {
« no previous file with comments | « no previous file | src/core/SkPaint.cpp » ('j') | src/core/SkScalerContext.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698