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

Unified Diff: src/core/SkResourceCache.cpp

Issue 1683883002: Add request cache to SkFontHost_fontconfig. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make method 'const'. Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkResourceCache.h ('k') | src/ports/SkFontHost_fontconfig.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkResourceCache.cpp
diff --git a/src/core/SkResourceCache.cpp b/src/core/SkResourceCache.cpp
index 6d8e1662d964ecb33099c78865d6e2e49d08e92a..5e6fe683f68b6bacaca89e06e31dc54d16214366 100644
--- a/src/core/SkResourceCache.cpp
+++ b/src/core/SkResourceCache.cpp
@@ -29,8 +29,8 @@ DECLARE_SKMESSAGEBUS_MESSAGE(SkResourceCache::PurgeSharedIDMessage)
#define SK_DEFAULT_IMAGE_CACHE_LIMIT (32 * 1024 * 1024)
#endif
-void SkResourceCache::Key::init(void* nameSpace, uint64_t sharedID, size_t length) {
- SkASSERT(SkAlign4(length) == length);
+void SkResourceCache::Key::init(void* nameSpace, uint64_t sharedID, size_t dataSize) {
+ SkASSERT(SkAlign4(dataSize) == dataSize);
// fCount32 and fHash are not hashed
static const int kUnhashedLocal32s = 2; // fCache32 + fHash
@@ -42,7 +42,7 @@ void SkResourceCache::Key::init(void* nameSpace, uint64_t sharedID, size_t lengt
static_assert(sizeof(Key) == offsetof(Key, fNamespace) + sizeof(fNamespace),
"namespace_field_must_be_last");
- fCount32 = SkToS32(kLocal32s + (length >> 2));
+ fCount32 = SkToS32(kLocal32s + (dataSize >> 2));
fSharedID_lo = (uint32_t)sharedID;
fSharedID_hi = (uint32_t)(sharedID >> 32);
fNamespace = nameSpace;
« no previous file with comments | « src/core/SkResourceCache.h ('k') | src/ports/SkFontHost_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698