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 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2132 typeface->serialize(&ostream); | 2132 typeface->serialize(&ostream); |
2133 SkAutoTDelete<SkStreamAsset> istream(ostream.detachAsStream()); | 2133 SkAutoTDelete<SkStreamAsset> istream(ostream.detachAsStream()); |
2134 SkFontDescriptor descriptor(istream); | 2134 SkFontDescriptor descriptor(istream); |
2135 | 2135 |
2136 str->append("<dt>Font Family Name:</dt><dd>"); | 2136 str->append("<dt>Font Family Name:</dt><dd>"); |
2137 str->append(descriptor.getFamilyName()); | 2137 str->append(descriptor.getFamilyName()); |
2138 str->append("</dd><dt>Font Full Name:</dt><dd>"); | 2138 str->append("</dd><dt>Font Full Name:</dt><dd>"); |
2139 str->append(descriptor.getFullName()); | 2139 str->append(descriptor.getFullName()); |
2140 str->append("</dd><dt>Font PS Name:</dt><dd>"); | 2140 str->append("</dd><dt>Font PS Name:</dt><dd>"); |
2141 str->append(descriptor.getPostscriptName()); | 2141 str->append(descriptor.getPostscriptName()); |
2142 str->append("</dd><dt>Font File Name:</dt><dd>"); | |
2143 str->append(descriptor.getFontFileName()); | |
2144 str->append("</dd>"); | 2142 str->append("</dd>"); |
2145 } | 2143 } |
2146 | 2144 |
2147 str->append("<dt>TextSize:</dt><dd>"); | 2145 str->append("<dt>TextSize:</dt><dd>"); |
2148 str->appendScalar(this->getTextSize()); | 2146 str->appendScalar(this->getTextSize()); |
2149 str->append("</dd>"); | 2147 str->append("</dd>"); |
2150 | 2148 |
2151 str->append("<dt>TextScaleX:</dt><dd>"); | 2149 str->append("<dt>TextScaleX:</dt><dd>"); |
2152 str->appendScalar(this->getTextScaleX()); | 2150 str->appendScalar(this->getTextScaleX()); |
2153 str->append("</dd>"); | 2151 str->append("</dd>"); |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2430 } | 2428 } |
2431 | 2429 |
2432 uint32_t SkPaint::getHash() const { | 2430 uint32_t SkPaint::getHash() const { |
2433 // 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, |
2434 // 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. |
2435 SK_COMPILE_ASSERT(offsetof(SkPaint, fBitfields) == 10 * sizeof(void*) + 6 *
sizeof(uint32_t), | 2433 SK_COMPILE_ASSERT(offsetof(SkPaint, fBitfields) == 10 * sizeof(void*) + 6 *
sizeof(uint32_t), |
2436 SkPaint_notPackedTightly); | 2434 SkPaint_notPackedTightly); |
2437 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this), | 2435 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this), |
2438 offsetof(SkPaint, fBitfields) + sizeof(fBitfields
)); | 2436 offsetof(SkPaint, fBitfields) + sizeof(fBitfields
)); |
2439 } | 2437 } |
OLD | NEW |