| 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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 | 552 |
| 553 for (int y = 0; y < height; ++y) { | 553 for (int y = 0; y < height; ++y) { |
| 554 for (int i = 0; i < octs; ++i) { | 554 for (int i = 0; i < octs; ++i) { |
| 555 *dst++ = pack_8_to_1(src); | 555 *dst++ = pack_8_to_1(src); |
| 556 src += 8; | 556 src += 8; |
| 557 } | 557 } |
| 558 if (leftOverBits > 0) { | 558 if (leftOverBits > 0) { |
| 559 unsigned bits = 0; | 559 unsigned bits = 0; |
| 560 int shift = 7; | 560 int shift = 7; |
| 561 for (int i = 0; i < leftOverBits; ++i, --shift) { | 561 for (int i = 0; i < leftOverBits; ++i, --shift) { |
| 562 bits |= convert_8_to_1(*src++ >> 7) << shift; | 562 bits |= convert_8_to_1(*src++) << shift; |
| 563 } | 563 } |
| 564 *dst++ = bits; | 564 *dst++ = bits; |
| 565 } | 565 } |
| 566 src += srcPad; | 566 src += srcPad; |
| 567 dst += dstPad; | 567 dst += dstPad; |
| 568 } | 568 } |
| 569 } | 569 } |
| 570 | 570 |
| 571 static void generateMask(const SkMask& mask, const SkPath& path, | 571 static void generateMask(const SkMask& mask, const SkPath& path, |
| 572 const SkMaskGamma::PreBlend& maskPreBlend) { | 572 const SkMaskGamma::PreBlend& maskPreBlend) { |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc, | 980 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc, |
| 981 bool allowFailure) const { | 981 bool allowFailure) const { |
| 982 SkScalerContext* c = this->onCreateScalerContext(desc); | 982 SkScalerContext* c = this->onCreateScalerContext(desc); |
| 983 | 983 |
| 984 if (!c && !allowFailure) { | 984 if (!c && !allowFailure) { |
| 985 c = SkNEW_ARGS(SkScalerContext_Empty, | 985 c = SkNEW_ARGS(SkScalerContext_Empty, |
| 986 (const_cast<SkTypeface*>(this), desc)); | 986 (const_cast<SkTypeface*>(this), desc)); |
| 987 } | 987 } |
| 988 return c; | 988 return c; |
| 989 } | 989 } |
| OLD | NEW |