| 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 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 GsA->preScale(SkScalarInvert(s->fX), SkScalarInvert(s->fY)); | 822 GsA->preScale(SkScalarInvert(s->fX), SkScalarInvert(s->fY)); |
| 823 } | 823 } |
| 824 } | 824 } |
| 825 | 825 |
| 826 SkAxisAlignment SkComputeAxisAlignmentForHText(const SkMatrix& matrix) { | 826 SkAxisAlignment SkComputeAxisAlignmentForHText(const SkMatrix& matrix) { |
| 827 SkASSERT(!matrix.hasPerspective()); | 827 SkASSERT(!matrix.hasPerspective()); |
| 828 | 828 |
| 829 if (0 == matrix[SkMatrix::kMSkewY]) { | 829 if (0 == matrix[SkMatrix::kMSkewY]) { |
| 830 return kX_SkAxisAlignment; | 830 return kX_SkAxisAlignment; |
| 831 } | 831 } |
| 832 if (0 == matrix[SkMatrix::kMScaleX]) { | 832 if (0 == matrix[SkMatrix::kMSkewX]) { |
| 833 return kY_SkAxisAlignment; | 833 return kY_SkAxisAlignment; |
| 834 } | 834 } |
| 835 return kNone_SkAxisAlignment; | 835 return kNone_SkAxisAlignment; |
| 836 } | 836 } |
| 837 | 837 |
| 838 /////////////////////////////////////////////////////////////////////////////// | 838 /////////////////////////////////////////////////////////////////////////////// |
| 839 | 839 |
| 840 class SkScalerContext_Empty : public SkScalerContext { | 840 class SkScalerContext_Empty : public SkScalerContext { |
| 841 public: | 841 public: |
| 842 SkScalerContext_Empty(SkTypeface* face, const SkDescriptor* desc) | 842 SkScalerContext_Empty(SkTypeface* face, const SkDescriptor* desc) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 868 | 868 |
| 869 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc, | 869 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc, |
| 870 bool allowFailure) const { | 870 bool allowFailure) const { |
| 871 SkScalerContext* c = this->onCreateScalerContext(desc); | 871 SkScalerContext* c = this->onCreateScalerContext(desc); |
| 872 | 872 |
| 873 if (!c && !allowFailure) { | 873 if (!c && !allowFailure) { |
| 874 c = new SkScalerContext_Empty(const_cast<SkTypeface*>(this), desc); | 874 c = new SkScalerContext_Empty(const_cast<SkTypeface*>(this), desc); |
| 875 } | 875 } |
| 876 return c; | 876 return c; |
| 877 } | 877 } |
| OLD | NEW |