OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 | 8 |
9 #include "SkScalerContext.h" | 9 #include "SkScalerContext.h" |
10 #include "SkAutoPixmapStorage.h" | 10 #include "SkAutoPixmapStorage.h" |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 return; | 395 return; |
396 } | 396 } |
397 } else { | 397 } else { |
398 dst.reset(info, mask.fImage, dstRB); | 398 dst.reset(info, mask.fImage, dstRB); |
399 } | 399 } |
400 sk_bzero(dst.writable_addr(), dst.getSafeSize()); | 400 sk_bzero(dst.writable_addr(), dst.getSafeSize()); |
401 | 401 |
402 SkDraw draw; | 402 SkDraw draw; |
403 draw.fDst = dst; | 403 draw.fDst = dst; |
404 draw.fRC = &clip; | 404 draw.fRC = &clip; |
405 draw.fClip = &clip.bwRgn(); | |
406 draw.fMatrix = &matrix; | 405 draw.fMatrix = &matrix; |
407 draw.drawPath(path, paint); | 406 draw.drawPath(path, paint); |
408 | 407 |
409 switch (mask.fFormat) { | 408 switch (mask.fFormat) { |
410 case SkMask::kBW_Format: | 409 case SkMask::kBW_Format: |
411 packA8ToA1(mask, dst.addr8(0, 0), dst.rowBytes()); | 410 packA8ToA1(mask, dst.addr8(0, 0), dst.rowBytes()); |
412 break; | 411 break; |
413 case SkMask::kA8_Format: | 412 case SkMask::kA8_Format: |
414 if (maskPreBlend.isApplicable()) { | 413 if (maskPreBlend.isApplicable()) { |
415 applyLUTToA8Mask(mask, maskPreBlend.fG); | 414 applyLUTToA8Mask(mask, maskPreBlend.fG); |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 SkScalerContext* SkTypeface::createScalerContext(const SkScalerContextEffects& e
ffects, | 860 SkScalerContext* SkTypeface::createScalerContext(const SkScalerContextEffects& e
ffects, |
862 const SkDescriptor* desc, | 861 const SkDescriptor* desc, |
863 bool allowFailure) const { | 862 bool allowFailure) const { |
864 SkScalerContext* c = this->onCreateScalerContext(effects, desc); | 863 SkScalerContext* c = this->onCreateScalerContext(effects, desc); |
865 | 864 |
866 if (!c && !allowFailure) { | 865 if (!c && !allowFailure) { |
867 c = new SkScalerContext_Empty(const_cast<SkTypeface*>(this), effects, de
sc); | 866 c = new SkScalerContext_Empty(const_cast<SkTypeface*>(this), effects, de
sc); |
868 } | 867 } |
869 return c; | 868 return c; |
870 } | 869 } |
OLD | NEW |