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 "SkThread.h" | |
25 | 24 |
26 #define ComputeBWRowBytes(width) (((unsigned)(width) + 7) >> 3) | 25 #define ComputeBWRowBytes(width) (((unsigned)(width) + 7) >> 3) |
27 | 26 |
28 void SkGlyph::toMask(SkMask* mask) const { | 27 void SkGlyph::toMask(SkMask* mask) const { |
29 SkASSERT(mask); | 28 SkASSERT(mask); |
30 | 29 |
31 mask->fImage = (uint8_t*)fImage; | 30 mask->fImage = (uint8_t*)fImage; |
32 mask->fBounds.set(fLeft, fTop, fLeft + fWidth, fTop + fHeight); | 31 mask->fBounds.set(fLeft, fTop, fLeft + fWidth, fTop + fHeight); |
33 mask->fRowBytes = this->rowBytes(); | 32 mask->fRowBytes = this->rowBytes(); |
34 mask->fFormat = static_cast<SkMask::Format>(fMaskFormat); | 33 mask->fFormat = static_cast<SkMask::Format>(fMaskFormat); |
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc, | 868 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc, |
870 bool allowFailure) const { | 869 bool allowFailure) const { |
871 SkScalerContext* c = this->onCreateScalerContext(desc); | 870 SkScalerContext* c = this->onCreateScalerContext(desc); |
872 | 871 |
873 if (!c && !allowFailure) { | 872 if (!c && !allowFailure) { |
874 c = SkNEW_ARGS(SkScalerContext_Empty, | 873 c = SkNEW_ARGS(SkScalerContext_Empty, |
875 (const_cast<SkTypeface*>(this), desc)); | 874 (const_cast<SkTypeface*>(this), desc)); |
876 } | 875 } |
877 return c; | 876 return c; |
878 } | 877 } |
OLD | NEW |