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

Unified Diff: src/effects/gradients/SkGradientBitmapCache.cpp

Issue 1809733002: detach -> release (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) Created 4 years, 9 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/effects/gradients/SkGradientBitmapCache.h ('k') | src/fonts/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkGradientBitmapCache.cpp
diff --git a/src/effects/gradients/SkGradientBitmapCache.cpp b/src/effects/gradients/SkGradientBitmapCache.cpp
index 24e7f5816b35e0bcee25a2f542f90133af415f27..cba103be36df69ca97ddc15185947774443a703b 100644
--- a/src/effects/gradients/SkGradientBitmapCache.cpp
+++ b/src/effects/gradients/SkGradientBitmapCache.cpp
@@ -51,7 +51,7 @@ SkGradientBitmapCache::~SkGradientBitmapCache() {
}
}
-SkGradientBitmapCache::Entry* SkGradientBitmapCache::detach(Entry* entry) const {
+SkGradientBitmapCache::Entry* SkGradientBitmapCache::release(Entry* entry) const {
if (entry->fPrev) {
SkASSERT(fHead != entry);
entry->fPrev->fNext = entry->fNext;
@@ -90,7 +90,7 @@ bool SkGradientBitmapCache::find(const void* buffer, size_t size, SkBitmap* bm)
*bm = entry->fBitmap;
}
// move to the head of our list, so we purge it last
- this->detach(entry);
+ this->release(entry);
this->attachToHead(entry);
return true;
}
@@ -104,7 +104,7 @@ void SkGradientBitmapCache::add(const void* buffer, size_t len, const SkBitmap&
if (fEntryCount == fMaxEntries) {
SkASSERT(fTail);
- delete this->detach(fTail);
+ delete this->release(fTail);
fEntryCount -= 1;
}
« no previous file with comments | « src/effects/gradients/SkGradientBitmapCache.h ('k') | src/fonts/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698