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

Unified Diff: src/core/SkResourceCache.h

Issue 667993002: small tweaks to SkResourceCache::Key (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkResourceCache.h
diff --git a/src/core/SkResourceCache.h b/src/core/SkResourceCache.h
index 665c0be498518008c3531728d0680ab6bcee25c6..c50b370eafd927e0aa8fe19bdb7183502ebb3e46 100644
--- a/src/core/SkResourceCache.h
+++ b/src/core/SkResourceCache.h
@@ -40,7 +40,7 @@ public:
bool operator==(const Key& other) const {
const uint32_t* a = this->as32();
const uint32_t* b = other.as32();
- for (int i = 0; i < fCount32; ++i) {
+ for (int i = 0; i < fCount32; ++i) { // (This checks fCount == other.fCount first.)
if (a[i] != b[i]) {
return false;
}
@@ -49,13 +49,11 @@ public:
}
private:
- // store fCount32 first, so we don't consider it in operator<
int32_t fCount32; // 2 + user contents count32
uint32_t fHash;
/* uint32_t fContents32[] */
const uint32_t* as32() const { return (const uint32_t*)this; }
- const uint32_t* as32SkipCount() const { return this->as32() + 1; }
};
struct Rec {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698