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

Unified Diff: src/core/SkScalerContext.cpp

Issue 1740163002: Improve horizontal baseline detection. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « src/core/SkScalerContext.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScalerContext.cpp
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index caef2d137721254b865e0f0b29f5fac9af8fadf4..c5f69c749b3217f388af81fabc76715f5af955a7 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -827,14 +827,14 @@ void SkScalerContextRec::computeMatrices(PreMatrixScale preMatrixScale, SkVector
}
}
-SkAxisAlignment SkComputeAxisAlignmentForHText(const SkMatrix& matrix) {
- SkASSERT(!matrix.hasPerspective());
-
- if (0 == matrix[SkMatrix::kMSkewY]) {
- return kX_SkAxisAlignment;
- }
- if (0 == matrix[SkMatrix::kMSkewX]) {
bungeman-skia 2016/02/29 18:00:27 This was incorrect, or at least doesn't do what th
- return kY_SkAxisAlignment;
+SkAxisAlignment SkScalerContext::computeAxisAlignmentForHText() {
+ if (fRec.getHinting() != SkPaint::kNo_Hinting) {
bungeman-skia 2016/02/29 18:00:27 This is causing a lot of churn in gold because mos
+ if (0 == fRec.fPost2x2[1][0]) {
bungeman-skia 2016/02/29 18:00:27 To answer the question, does this need to use getS
+ return kX_SkAxisAlignment;
+ }
+ if (0 == fRec.fPost2x2[0][0]) {
+ return kY_SkAxisAlignment;
+ }
}
return kNone_SkAxisAlignment;
}
« no previous file with comments | « src/core/SkScalerContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698