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 #include "SkPaint.h" | 8 #include "SkPaint.h" |
9 #include "SkAnnotation.h" | 9 #include "SkAnnotation.h" |
10 #include "SkAutoKern.h" | 10 #include "SkAutoKern.h" |
11 #include "SkChecksum.h" | 11 #include "SkChecksum.h" |
12 #include "SkColorFilter.h" | 12 #include "SkColorFilter.h" |
13 #include "SkData.h" | 13 #include "SkData.h" |
14 #include "SkDraw.h" | 14 #include "SkDraw.h" |
15 #include "SkFontDescriptor.h" | 15 #include "SkFontDescriptor.h" |
16 #include "SkGlyphCache.h" | 16 #include "SkGlyphCache.h" |
17 #include "SkImageFilter.h" | 17 #include "SkImageFilter.h" |
18 #include "SkMaskFilter.h" | 18 #include "SkMaskFilter.h" |
19 #include "SkMaskGamma.h" | 19 #include "SkMaskGamma.h" |
20 #include "SkMutex.h" | |
21 #include "SkReadBuffer.h" | 20 #include "SkReadBuffer.h" |
22 #include "SkWriteBuffer.h" | 21 #include "SkWriteBuffer.h" |
23 #include "SkPaintDefaults.h" | 22 #include "SkPaintDefaults.h" |
24 #include "SkPathEffect.h" | 23 #include "SkPathEffect.h" |
25 #include "SkRasterizer.h" | 24 #include "SkRasterizer.h" |
26 #include "SkScalar.h" | 25 #include "SkScalar.h" |
27 #include "SkScalerContext.h" | 26 #include "SkScalerContext.h" |
28 #include "SkShader.h" | 27 #include "SkShader.h" |
29 #include "SkStringUtils.h" | 28 #include "SkStringUtils.h" |
30 #include "SkStroke.h" | 29 #include "SkStroke.h" |
(...skipping 2386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2417 } | 2416 } |
2418 | 2417 |
2419 uint32_t SkPaint::getHash() const { | 2418 uint32_t SkPaint::getHash() const { |
2420 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB
itfields, | 2419 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB
itfields, |
2421 // so fBitfields should be 10 pointers and 6 32-bit values from the start. | 2420 // so fBitfields should be 10 pointers and 6 32-bit values from the start. |
2422 SK_COMPILE_ASSERT(offsetof(SkPaint, fBitfields) == 10 * sizeof(void*) + 6 *
sizeof(uint32_t), | 2421 SK_COMPILE_ASSERT(offsetof(SkPaint, fBitfields) == 10 * sizeof(void*) + 6 *
sizeof(uint32_t), |
2423 SkPaint_notPackedTightly); | 2422 SkPaint_notPackedTightly); |
2424 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this), | 2423 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this), |
2425 offsetof(SkPaint, fBitfields) + sizeof(fBitfields
)); | 2424 offsetof(SkPaint, fBitfields) + sizeof(fBitfields
)); |
2426 } | 2425 } |
OLD | NEW |