| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 SkSafeUnref(fPathEffect); | 118 SkSafeUnref(fPathEffect); |
| 119 SkSafeUnref(fMaskFilter); | 119 SkSafeUnref(fMaskFilter); |
| 120 SkSafeUnref(fRasterizer); | 120 SkSafeUnref(fRasterizer); |
| 121 } | 121 } |
| 122 | 122 |
| 123 // Return the context associated with the next logical typeface, or NULL if | 123 // Return the context associated with the next logical typeface, or NULL if |
| 124 // there are no more entries in the fallback chain. | 124 // there are no more entries in the fallback chain. |
| 125 SkScalerContext* SkScalerContext::allocNextContext() const { | 125 SkScalerContext* SkScalerContext::allocNextContext() const { |
| 126 #ifdef SK_BUILD_FOR_ANDROID | 126 #ifdef SK_BUILD_FOR_ANDROID |
| 127 SkTypeface* newFace = SkAndroidNextLogicalTypeface(fRec.fFontID, | 127 SkTypeface* newFace = SkAndroidNextLogicalTypeface(fRec); |
| 128 fRec.fOrigFontID); | |
| 129 if (0 == newFace) { | 128 if (0 == newFace) { |
| 130 return NULL; | 129 return NULL; |
| 131 } | 130 } |
| 132 | 131 |
| 133 SkAutoTUnref<SkTypeface> aur(newFace); | 132 SkAutoTUnref<SkTypeface> aur(newFace); |
| 134 uint32_t newFontID = newFace->uniqueID(); | 133 uint32_t newFontID = newFace->uniqueID(); |
| 135 | 134 |
| 136 SkAutoDescriptor ad(sizeof(fRec) + SkDescriptor::ComputeOverhead(1)); | 135 SkAutoDescriptor ad(sizeof(fRec) + SkDescriptor::ComputeOverhead(1)); |
| 137 SkDescriptor* desc = ad.getDesc(); | 136 SkDescriptor* desc = ad.getDesc(); |
| 138 | 137 |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 SkScalerContext* c = NULL; //SkCreateColorScalerContext(desc); | 840 SkScalerContext* c = NULL; //SkCreateColorScalerContext(desc); |
| 842 if (NULL == c) { | 841 if (NULL == c) { |
| 843 c = this->onCreateScalerContext(desc); | 842 c = this->onCreateScalerContext(desc); |
| 844 } | 843 } |
| 845 if (NULL == c) { | 844 if (NULL == c) { |
| 846 c = SkNEW_ARGS(SkScalerContext_Empty, | 845 c = SkNEW_ARGS(SkScalerContext_Empty, |
| 847 (const_cast<SkTypeface*>(this), desc)); | 846 (const_cast<SkTypeface*>(this), desc)); |
| 848 } | 847 } |
| 849 return c; | 848 return c; |
| 850 } | 849 } |
| OLD | NEW |