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

Unified Diff: src/core/SkScalerContext.cpp

Issue 752183002: Use text size on Mac. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments. Created 6 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 | « src/core/SkScalerContext.h ('k') | src/ports/SkFontHost_mac.cpp » ('j') | 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 20413a7dd7f292cab3406cc7aa7e4a0e1025520f..b7409ffe9ecbf1e7aace9bcf86ff16d011d7a4ec 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -700,6 +700,10 @@ void SkScalerContextRec::getLocalMatrix(SkMatrix* m) const {
SkPaint::SetTextMatrix(m, fTextSize, fPreScaleX, fPreSkewX);
}
+void SkScalerContextRec::getLocalMatrixWithoutTextSize(SkMatrix* m) const {
+ SkPaint::SetTextMatrix(m, SK_Scalar1, fPreScaleX, fPreSkewX);
+}
+
void SkScalerContextRec::getSingleMatrix(SkMatrix* m) const {
this->getLocalMatrix(m);
@@ -709,6 +713,15 @@ void SkScalerContextRec::getSingleMatrix(SkMatrix* m) const {
m->postConcat(deviceMatrix);
}
+void SkScalerContextRec::getSingleMatrixWithoutTextSize(SkMatrix* m) const {
+ this->getLocalMatrixWithoutTextSize(m);
+
+ // now concat the device matrix
+ SkMatrix deviceMatrix;
+ this->getMatrixFrom2x2(&deviceMatrix);
+ m->postConcat(deviceMatrix);
+}
+
SkAxisAlignment SkComputeAxisAlignmentForHText(const SkMatrix& matrix) {
SkASSERT(!matrix.hasPerspective());
« no previous file with comments | « src/core/SkScalerContext.h ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698