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" |
11 #include "SkColorPriv.h" | 11 #include "SkColorPriv.h" |
12 #include "SkDescriptor.h" | 12 #include "SkDescriptor.h" |
13 #include "SkDraw.h" | 13 #include "SkDraw.h" |
14 #include "SkGlyph.h" | 14 #include "SkGlyph.h" |
15 #include "SkMaskFilter.h" | 15 #include "SkMaskFilter.h" |
16 #include "SkMaskGamma.h" | 16 #include "SkMaskGamma.h" |
17 #include "SkMatrix22.h" | 17 #include "SkMatrix22.h" |
18 #include "SkReadBuffer.h" | 18 #include "SkReadBuffer.h" |
19 #include "SkWriteBuffer.h" | 19 #include "SkWriteBuffer.h" |
20 #include "SkPathEffect.h" | 20 #include "SkPathEffect.h" |
21 #include "SkRasterizer.h" | 21 #include "SkRasterizer.h" |
22 #include "SkRasterClip.h" | 22 #include "SkRasterClip.h" |
23 #include "SkStroke.h" | 23 #include "SkStroke.h" |
| 24 #include "SkStrokeRec.h" |
24 | 25 |
25 #define ComputeBWRowBytes(width) (((unsigned)(width) + 7) >> 3) | 26 #define ComputeBWRowBytes(width) (((unsigned)(width) + 7) >> 3) |
26 | 27 |
27 void SkGlyph::toMask(SkMask* mask) const { | 28 void SkGlyph::toMask(SkMask* mask) const { |
28 SkASSERT(mask); | 29 SkASSERT(mask); |
29 | 30 |
30 mask->fImage = (uint8_t*)fImage; | 31 mask->fImage = (uint8_t*)fImage; |
31 mask->fBounds.set(fLeft, fTop, fLeft + fWidth, fTop + fHeight); | 32 mask->fBounds.set(fLeft, fTop, fLeft + fWidth, fTop + fHeight); |
32 mask->fRowBytes = this->rowBytes(); | 33 mask->fRowBytes = this->rowBytes(); |
33 mask->fFormat = static_cast<SkMask::Format>(fMaskFormat); | 34 mask->fFormat = static_cast<SkMask::Format>(fMaskFormat); |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 | 868 |
868 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc, | 869 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc, |
869 bool allowFailure) const { | 870 bool allowFailure) const { |
870 SkScalerContext* c = this->onCreateScalerContext(desc); | 871 SkScalerContext* c = this->onCreateScalerContext(desc); |
871 | 872 |
872 if (!c && !allowFailure) { | 873 if (!c && !allowFailure) { |
873 c = new SkScalerContext_Empty(const_cast<SkTypeface*>(this), desc); | 874 c = new SkScalerContext_Empty(const_cast<SkTypeface*>(this), desc); |
874 } | 875 } |
875 return c; | 876 return c; |
876 } | 877 } |
OLD | NEW |