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

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

Issue 474983005: rename gradients private BitmapCache to GradientBitmapCache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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/effects/gradients/SkGradientShader.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/SkBitmapCache.cpp b/src/effects/gradients/SkGradientBitmapCache.cpp
similarity index 84%
rename from src/effects/gradients/SkBitmapCache.cpp
rename to src/effects/gradients/SkGradientBitmapCache.cpp
index 95175e4fb60639d1d5a11e1f4ee831fc26bbad34..63d708bad0f5096a86cf3171b73f082f110d1cb8 100644
--- a/src/effects/gradients/SkBitmapCache.cpp
+++ b/src/effects/gradients/SkGradientBitmapCache.cpp
@@ -7,9 +7,9 @@
*/
-#include "SkBitmapCache.h"
+#include "SkGradientBitmapCache.h"
-struct SkBitmapCache::Entry {
+struct SkGradientBitmapCache::Entry {
Entry* fPrev;
Entry* fNext;
@@ -33,14 +33,14 @@ struct SkBitmapCache::Entry {
}
};
-SkBitmapCache::SkBitmapCache(int max) : fMaxEntries(max) {
+SkGradientBitmapCache::SkGradientBitmapCache(int max) : fMaxEntries(max) {
fEntryCount = 0;
fHead = fTail = NULL;
this->validate();
}
-SkBitmapCache::~SkBitmapCache() {
+SkGradientBitmapCache::~SkGradientBitmapCache() {
this->validate();
Entry* entry = fHead;
@@ -51,7 +51,7 @@ SkBitmapCache::~SkBitmapCache() {
}
}
-SkBitmapCache::Entry* SkBitmapCache::detach(Entry* entry) const {
+SkGradientBitmapCache::Entry* SkGradientBitmapCache::detach(Entry* entry) const {
if (entry->fPrev) {
SkASSERT(fHead != entry);
entry->fPrev->fNext = entry->fNext;
@@ -69,7 +69,7 @@ SkBitmapCache::Entry* SkBitmapCache::detach(Entry* entry) const {
return entry;
}
-void SkBitmapCache::attachToHead(Entry* entry) const {
+void SkGradientBitmapCache::attachToHead(Entry* entry) const {
entry->fPrev = NULL;
entry->fNext = fHead;
if (fHead) {
@@ -80,7 +80,7 @@ void SkBitmapCache::attachToHead(Entry* entry) const {
fHead = entry;
}
-bool SkBitmapCache::find(const void* buffer, size_t size, SkBitmap* bm) const {
+bool SkGradientBitmapCache::find(const void* buffer, size_t size, SkBitmap* bm) const {
AutoValidate av(this);
Entry* entry = fHead;
@@ -99,7 +99,7 @@ bool SkBitmapCache::find(const void* buffer, size_t size, SkBitmap* bm) const {
return false;
}
-void SkBitmapCache::add(const void* buffer, size_t len, const SkBitmap& bm) {
+void SkGradientBitmapCache::add(const void* buffer, size_t len, const SkBitmap& bm) {
AutoValidate av(this);
if (fEntryCount == fMaxEntries) {
@@ -117,7 +117,7 @@ void SkBitmapCache::add(const void* buffer, size_t len, const SkBitmap& bm) {
#ifdef SK_DEBUG
-void SkBitmapCache::validate() const {
+void SkGradientBitmapCache::validate() const {
SkASSERT(fEntryCount >= 0 && fEntryCount <= fMaxEntries);
if (fEntryCount > 0) {
« no previous file with comments | « src/effects/gradients/SkGradientBitmapCache.h ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698