| 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" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "SkRasterizer.h" | 25 #include "SkRasterizer.h" |
| 26 #include "SkScalar.h" | 26 #include "SkScalar.h" |
| 27 #include "SkScalerContext.h" | 27 #include "SkScalerContext.h" |
| 28 #include "SkShader.h" | 28 #include "SkShader.h" |
| 29 #include "SkStringUtils.h" | 29 #include "SkStringUtils.h" |
| 30 #include "SkStroke.h" | 30 #include "SkStroke.h" |
| 31 #include "SkTextFormatParams.h" | 31 #include "SkTextFormatParams.h" |
| 32 #include "SkTextToPathIter.h" | 32 #include "SkTextToPathIter.h" |
| 33 #include "SkTLazy.h" | 33 #include "SkTLazy.h" |
| 34 #include "SkTypeface.h" | 34 #include "SkTypeface.h" |
| 35 #include "SkStrokeRec.h" |
| 35 #include "SkSurfacePriv.h" | 36 #include "SkSurfacePriv.h" |
| 36 #include "SkXfermode.h" | 37 #include "SkXfermode.h" |
| 37 | 38 |
| 38 // define this to get a printf for out-of-range parameter in setters | 39 // define this to get a printf for out-of-range parameter in setters |
| 39 // e.g. setTextSize(-1) | 40 // e.g. setTextSize(-1) |
| 40 //#define SK_REPORT_API_RANGE_CHECK | 41 //#define SK_REPORT_API_RANGE_CHECK |
| 41 | 42 |
| 42 SkPaint::SkPaint() { | 43 SkPaint::SkPaint() { |
| 43 fTypeface = nullptr; | 44 fTypeface = nullptr; |
| 44 fPathEffect = nullptr; | 45 fPathEffect = nullptr; |
| (...skipping 2382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2427 } | 2428 } |
| 2428 | 2429 |
| 2429 uint32_t SkPaint::getHash() const { | 2430 uint32_t SkPaint::getHash() const { |
| 2430 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB
itfields, | 2431 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB
itfields, |
| 2431 // so fBitfields should be 10 pointers and 6 32-bit values from the start. | 2432 // so fBitfields should be 10 pointers and 6 32-bit values from the start. |
| 2432 static_assert(offsetof(SkPaint, fBitfields) == 10 * sizeof(void*) + 6 * size
of(uint32_t), | 2433 static_assert(offsetof(SkPaint, fBitfields) == 10 * sizeof(void*) + 6 * size
of(uint32_t), |
| 2433 "SkPaint_notPackedTightly"); | 2434 "SkPaint_notPackedTightly"); |
| 2434 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this), | 2435 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this), |
| 2435 offsetof(SkPaint, fBitfields) + sizeof(fBitfields
)); | 2436 offsetof(SkPaint, fBitfields) + sizeof(fBitfields
)); |
| 2436 } | 2437 } |
| OLD | NEW |