| 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 | 8 |
| 9 #ifndef SkDescriptor_DEFINED | 9 #ifndef SkDescriptor_DEFINED |
| 10 #define SkDescriptor_DEFINED | 10 #define SkDescriptor_DEFINED |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // remove the aa < stop test in the loop... | 95 // remove the aa < stop test in the loop... |
| 96 const uint32_t* aa = (const uint32_t*)this; | 96 const uint32_t* aa = (const uint32_t*)this; |
| 97 const uint32_t* bb = (const uint32_t*)&other; | 97 const uint32_t* bb = (const uint32_t*)&other; |
| 98 const uint32_t* stop = (const uint32_t*)((const char*)aa + fLength); | 98 const uint32_t* stop = (const uint32_t*)((const char*)aa + fLength); |
| 99 do { | 99 do { |
| 100 if (*aa++ != *bb++) | 100 if (*aa++ != *bb++) |
| 101 return false; | 101 return false; |
| 102 } while (aa < stop); | 102 } while (aa < stop); |
| 103 return true; | 103 return true; |
| 104 } | 104 } |
| 105 bool operator!=(const SkDescriptor& other) const { return !(*this == other);
} |
| 105 | 106 |
| 106 uint32_t getChecksum() const { return fChecksum; } | 107 uint32_t getChecksum() const { return fChecksum; } |
| 107 | 108 |
| 108 struct Entry { | 109 struct Entry { |
| 109 uint32_t fTag; | 110 uint32_t fTag; |
| 110 uint32_t fLen; | 111 uint32_t fLen; |
| 111 }; | 112 }; |
| 112 | 113 |
| 113 #ifdef SK_DEBUG | 114 #ifdef SK_DEBUG |
| 114 uint32_t getCount() const { return fCount; } | 115 uint32_t getCount() const { return fCount; } |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 + sizeof(SkDescriptor::Entry) + sizeof(void*)
// for typeface | 167 + sizeof(SkDescriptor::Entry) + sizeof(void*)
// for typeface |
| 167 + 32 // slop for occational small extras | 168 + 32 // slop for occational small extras |
| 168 }; | 169 }; |
| 169 SkDescriptor* fDesc; | 170 SkDescriptor* fDesc; |
| 170 uint32_t fStorage[(kStorageSize + 3) >> 2]; | 171 uint32_t fStorage[(kStorageSize + 3) >> 2]; |
| 171 }; | 172 }; |
| 172 #define SkAutoDescriptor(...) SK_REQUIRE_LOCAL_VAR(SkAutoDescriptor) | 173 #define SkAutoDescriptor(...) SK_REQUIRE_LOCAL_VAR(SkAutoDescriptor) |
| 173 | 174 |
| 174 | 175 |
| 175 #endif | 176 #endif |
| OLD | NEW |