diff options
author | mtklein <mtklein@chromium.org> | 2016-03-16 13:53:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-16 13:53:35 -0700 |
commit | 18300a3aa7cb6eb55d21bb0450dffa58b6fc062c (patch) | |
tree | d1c0f54567937ed7dd44fb17842c6c1b544815d0 /src/effects/gradients | |
parent | 830dfd87a7707f687e13da5be645e75c746a2cf5 (diff) |
detach -> release
The C++ standard library uses the name "release" for the operation we call "detach".
Rewriting each "detach(" to "release(" brings us a step closer to using standard library types directly (e.g. std::unique_ptr instead of SkAutoTDelete).
This was a fairly blind transformation. There may have been unintentional conversions in here, but it's probably for the best to have everything uniformly say "release".
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1809733002
Review URL: https://codereview.chromium.org/1809733002
Diffstat (limited to 'src/effects/gradients')
-rw-r--r-- | src/effects/gradients/SkGradientBitmapCache.cpp | 6 | ||||
-rw-r--r-- | src/effects/gradients/SkGradientBitmapCache.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/effects/gradients/SkGradientBitmapCache.cpp b/src/effects/gradients/SkGradientBitmapCache.cpp index 24e7f5816b..cba103be36 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; } diff --git a/src/effects/gradients/SkGradientBitmapCache.h b/src/effects/gradients/SkGradientBitmapCache.h index 009b9561a7..81bd214fe0 100644 --- a/src/effects/gradients/SkGradientBitmapCache.h +++ b/src/effects/gradients/SkGradientBitmapCache.h @@ -28,7 +28,7 @@ private: mutable Entry* fHead; mutable Entry* fTail; - inline Entry* detach(Entry*) const; + inline Entry* release(Entry*) const; inline void attachToHead(Entry*) const; #ifdef SK_DEBUG |