| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkScalerContext.h" | 10 #include "SkScalerContext.h" |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 } | 686 } |
| 687 if (fillPath) { | 687 if (fillPath) { |
| 688 fillPath->updateBoundsCache(); | 688 fillPath->updateBoundsCache(); |
| 689 } | 689 } |
| 690 } | 690 } |
| 691 | 691 |
| 692 | 692 |
| 693 void SkScalerContextRec::getMatrixFrom2x2(SkMatrix* dst) const { | 693 void SkScalerContextRec::getMatrixFrom2x2(SkMatrix* dst) const { |
| 694 dst->setAll(fPost2x2[0][0], fPost2x2[0][1], 0, | 694 dst->setAll(fPost2x2[0][0], fPost2x2[0][1], 0, |
| 695 fPost2x2[1][0], fPost2x2[1][1], 0, | 695 fPost2x2[1][0], fPost2x2[1][1], 0, |
| 696 0, 0, SkScalarToPersp(SK_Scalar1)); | 696 0, 0, 1); |
| 697 } | 697 } |
| 698 | 698 |
| 699 void SkScalerContextRec::getLocalMatrix(SkMatrix* m) const { | 699 void SkScalerContextRec::getLocalMatrix(SkMatrix* m) const { |
| 700 SkPaint::SetTextMatrix(m, fTextSize, fPreScaleX, fPreSkewX); | 700 SkPaint::SetTextMatrix(m, fTextSize, fPreScaleX, fPreSkewX); |
| 701 } | 701 } |
| 702 | 702 |
| 703 void SkScalerContextRec::getLocalMatrixWithoutTextSize(SkMatrix* m) const { | 703 void SkScalerContextRec::getLocalMatrixWithoutTextSize(SkMatrix* m) const { |
| 704 SkPaint::SetTextMatrix(m, SK_Scalar1, fPreScaleX, fPreSkewX); | 704 SkPaint::SetTextMatrix(m, SK_Scalar1, fPreScaleX, fPreSkewX); |
| 705 } | 705 } |
| 706 | 706 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc, | 882 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc, |
| 883 bool allowFailure) const { | 883 bool allowFailure) const { |
| 884 SkScalerContext* c = this->onCreateScalerContext(desc); | 884 SkScalerContext* c = this->onCreateScalerContext(desc); |
| 885 | 885 |
| 886 if (!c && !allowFailure) { | 886 if (!c && !allowFailure) { |
| 887 c = SkNEW_ARGS(SkScalerContext_Empty, | 887 c = SkNEW_ARGS(SkScalerContext_Empty, |
| 888 (const_cast<SkTypeface*>(this), desc)); | 888 (const_cast<SkTypeface*>(this), desc)); |
| 889 } | 889 } |
| 890 return c; | 890 return c; |
| 891 } | 891 } |
| OLD | NEW |