Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: src/core/SkDescriptor.h

Issue 1983353003: Attempt to improve lifetime management of SkGlyphCache in Ganesh atlas text code. (Closed) Base URL: https://skia.googlesource.com/skia.git@fixtest
Patch Set: Updated to only compare descriptors Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/core/SkGlyphCache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/core/SkGlyphCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698