| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkTypes.h" | 8 #include "SkTypes.h" |
| 9 #undef GetGlyphIndices | 9 #undef GetGlyphIndices |
| 10 | 10 |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 fXform.dy = 0; | 794 fXform.dy = 0; |
| 795 | 795 |
| 796 // GsA is the non-rotational part of A without the text height scale. | 796 // GsA is the non-rotational part of A without the text height scale. |
| 797 SkMatrix GsA(GA); | 797 SkMatrix GsA(GA); |
| 798 GsA.preScale(scale, scale); //remove text height scale, G is rotational so r
eorders with scale. | 798 GsA.preScale(scale, scale); //remove text height scale, G is rotational so r
eorders with scale. |
| 799 | 799 |
| 800 fGsA.m11 = SkScalarToFloat(GsA.get(SkMatrix::kMScaleX)); | 800 fGsA.m11 = SkScalarToFloat(GsA.get(SkMatrix::kMScaleX)); |
| 801 fGsA.m12 = SkScalarToFloat(GsA.get(SkMatrix::kMSkewY)); // This should be ~0
. | 801 fGsA.m12 = SkScalarToFloat(GsA.get(SkMatrix::kMSkewY)); // This should be ~0
. |
| 802 fGsA.m21 = SkScalarToFloat(GsA.get(SkMatrix::kMSkewX)); | 802 fGsA.m21 = SkScalarToFloat(GsA.get(SkMatrix::kMSkewX)); |
| 803 fGsA.m22 = SkScalarToFloat(GsA.get(SkMatrix::kMScaleY)); | 803 fGsA.m22 = SkScalarToFloat(GsA.get(SkMatrix::kMScaleY)); |
| 804 fGsA.dx = 0; |
| 805 fGsA.dy = 0; |
| 804 | 806 |
| 805 // fG_inv is G inverse, which is fairly simple since G is 2x2 rotational. | 807 // fG_inv is G inverse, which is fairly simple since G is 2x2 rotational. |
| 806 fG_inv.setAll(G.get(SkMatrix::kMScaleX), -G.get(SkMatrix::kMSkewX), G.get(Sk
Matrix::kMTransX), | 808 fG_inv.setAll(G.get(SkMatrix::kMScaleX), -G.get(SkMatrix::kMSkewX), G.get(Sk
Matrix::kMTransX), |
| 807 -G.get(SkMatrix::kMSkewY), G.get(SkMatrix::kMScaleY), G.get(Sk
Matrix::kMTransY), | 809 -G.get(SkMatrix::kMSkewY), G.get(SkMatrix::kMScaleY), G.get(Sk
Matrix::kMTransY), |
| 808 G.get(SkMatrix::kMPersp0), G.get(SkMatrix::kMPersp1), G.get(Sk
Matrix::kMPersp2)); | 810 G.get(SkMatrix::kMPersp0), G.get(SkMatrix::kMPersp1), G.get(Sk
Matrix::kMPersp2)); |
| 809 } | 811 } |
| 810 | 812 |
| 811 SkScalerContext_DW::~SkScalerContext_DW() { | 813 SkScalerContext_DW::~SkScalerContext_DW() { |
| 812 } | 814 } |
| 813 | 815 |
| (...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2002 } | 2004 } |
| 2003 | 2005 |
| 2004 #include "SkFontMgr_indirect.h" | 2006 #include "SkFontMgr_indirect.h" |
| 2005 SkFontMgr* SkFontMgr_New_DirectWriteRenderer(SkRemotableFontMgr* proxy) { | 2007 SkFontMgr* SkFontMgr_New_DirectWriteRenderer(SkRemotableFontMgr* proxy) { |
| 2006 SkAutoTUnref<SkFontMgr> impl(SkFontMgr_New_DirectWrite()); | 2008 SkAutoTUnref<SkFontMgr> impl(SkFontMgr_New_DirectWrite()); |
| 2007 if (impl.get() == NULL) { | 2009 if (impl.get() == NULL) { |
| 2008 return NULL; | 2010 return NULL; |
| 2009 } | 2011 } |
| 2010 return SkNEW_ARGS(SkFontMgr_Indirect, (impl.get(), proxy)); | 2012 return SkNEW_ARGS(SkFontMgr_Indirect, (impl.get(), proxy)); |
| 2011 } | 2013 } |
| OLD | NEW |