| 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 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2135 typeface->serialize(&ostream); | 2135 typeface->serialize(&ostream); |
| 2136 SkAutoTDelete<SkStreamAsset> istream(ostream.detachAsStream()); | 2136 SkAutoTDelete<SkStreamAsset> istream(ostream.detachAsStream()); |
| 2137 SkFontDescriptor descriptor(istream); | 2137 SkFontDescriptor descriptor(istream); |
| 2138 | 2138 |
| 2139 str->append("<dt>Font Family Name:</dt><dd>"); | 2139 str->append("<dt>Font Family Name:</dt><dd>"); |
| 2140 str->append(descriptor.getFamilyName()); | 2140 str->append(descriptor.getFamilyName()); |
| 2141 str->append("</dd><dt>Font Full Name:</dt><dd>"); | 2141 str->append("</dd><dt>Font Full Name:</dt><dd>"); |
| 2142 str->append(descriptor.getFullName()); | 2142 str->append(descriptor.getFullName()); |
| 2143 str->append("</dd><dt>Font PS Name:</dt><dd>"); | 2143 str->append("</dd><dt>Font PS Name:</dt><dd>"); |
| 2144 str->append(descriptor.getPostscriptName()); | 2144 str->append(descriptor.getPostscriptName()); |
| 2145 str->append("</dd><dt>Font File Name:</dt><dd>"); | |
| 2146 str->append(descriptor.getFontFileName()); | |
| 2147 str->append("</dd>"); | 2145 str->append("</dd>"); |
| 2148 } | 2146 } |
| 2149 | 2147 |
| 2150 str->append("<dt>TextSize:</dt><dd>"); | 2148 str->append("<dt>TextSize:</dt><dd>"); |
| 2151 str->appendScalar(this->getTextSize()); | 2149 str->appendScalar(this->getTextSize()); |
| 2152 str->append("</dd>"); | 2150 str->append("</dd>"); |
| 2153 | 2151 |
| 2154 str->append("<dt>TextScaleX:</dt><dd>"); | 2152 str->append("<dt>TextScaleX:</dt><dd>"); |
| 2155 str->appendScalar(this->getTextScaleX()); | 2153 str->appendScalar(this->getTextScaleX()); |
| 2156 str->append("</dd>"); | 2154 str->append("</dd>"); |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2433 } | 2431 } |
| 2434 | 2432 |
| 2435 uint32_t SkPaint::getHash() const { | 2433 uint32_t SkPaint::getHash() const { |
| 2436 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB
itfields, | 2434 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB
itfields, |
| 2437 // so fBitfields should be 10 pointers and 6 32-bit values from the start. | 2435 // so fBitfields should be 10 pointers and 6 32-bit values from the start. |
| 2438 SK_COMPILE_ASSERT(offsetof(SkPaint, fBitfields) == 10 * sizeof(void*) + 6 *
sizeof(uint32_t), | 2436 SK_COMPILE_ASSERT(offsetof(SkPaint, fBitfields) == 10 * sizeof(void*) + 6 *
sizeof(uint32_t), |
| 2439 SkPaint_notPackedTightly); | 2437 SkPaint_notPackedTightly); |
| 2440 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this), | 2438 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this), |
| 2441 offsetof(SkPaint, fBitfields) + sizeof(fBitfields
)); | 2439 offsetof(SkPaint, fBitfields) + sizeof(fBitfields
)); |
| 2442 } | 2440 } |
| OLD | NEW |