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

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

Issue 390103002: Replace use of GrTHashTable in GrFontCache with SkTDynamicHash. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove deleteAll(); use iterator instead. Created 6 years, 5 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 | « include/gpu/GrGlyph.h ('k') | src/gpu/GrTextStrike.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkDescriptor_DEFINED 10 #ifndef SkDescriptor_DEFINED
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 #endif 116 #endif
117 117
118 private: 118 private:
119 uint32_t fChecksum; // must be first 119 uint32_t fChecksum; // must be first
120 uint32_t fLength; // must be second 120 uint32_t fLength; // must be second
121 uint32_t fCount; 121 uint32_t fCount;
122 122
123 static uint32_t ComputeChecksum(const SkDescriptor* desc) { 123 static uint32_t ComputeChecksum(const SkDescriptor* desc) {
124 const uint32_t* ptr = (const uint32_t*)desc + 1; // skip the checksum fi eld 124 const uint32_t* ptr = (const uint32_t*)desc + 1; // skip the checksum fi eld
125 size_t len = desc->fLength - sizeof(uint32_t); 125 size_t len = desc->fLength - sizeof(uint32_t);
126 return SkChecksum::Compute(ptr, len); 126 return SkChecksum::Murmur3(ptr, len);
127 } 127 }
128 128
129 // private so no one can create one except our factories 129 // private so no one can create one except our factories
130 SkDescriptor() {} 130 SkDescriptor() {}
131 }; 131 };
132 132
133 #include "SkScalerContext.h" 133 #include "SkScalerContext.h"
134 134
135 class SkAutoDescriptor : SkNoncopyable { 135 class SkAutoDescriptor : SkNoncopyable {
136 public: 136 public:
(...skipping 19 matching lines...) Expand all
156 + sizeof(SkDescriptor::Entry) + sizeof(void*) // for typeface 156 + sizeof(SkDescriptor::Entry) + sizeof(void*) // for typeface
157 + 32 // slop for occational small extras 157 + 32 // slop for occational small extras
158 }; 158 };
159 SkDescriptor* fDesc; 159 SkDescriptor* fDesc;
160 uint32_t fStorage[(kStorageSize + 3) >> 2]; 160 uint32_t fStorage[(kStorageSize + 3) >> 2];
161 }; 161 };
162 #define SkAutoDescriptor(...) SK_REQUIRE_LOCAL_VAR(SkAutoDescriptor) 162 #define SkAutoDescriptor(...) SK_REQUIRE_LOCAL_VAR(SkAutoDescriptor)
163 163
164 164
165 #endif 165 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrGlyph.h ('k') | src/gpu/GrTextStrike.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698