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

Side by Side Diff: src/effects/gradients/SkGradientBitmapCache.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/effects/SkTileImageFilter.cpp ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkGradientBitmapCache.h" 10 #include "SkGradientBitmapCache.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 void SkGradientBitmapCache::add(const void* buffer, size_t len, const SkBitmap& bm) { 102 void SkGradientBitmapCache::add(const void* buffer, size_t len, const SkBitmap& bm) {
103 AutoValidate av(this); 103 AutoValidate av(this);
104 104
105 if (fEntryCount == fMaxEntries) { 105 if (fEntryCount == fMaxEntries) {
106 SkASSERT(fTail); 106 SkASSERT(fTail);
107 delete this->detach(fTail); 107 delete this->detach(fTail);
108 fEntryCount -= 1; 108 fEntryCount -= 1;
109 } 109 }
110 110
111 Entry* entry = SkNEW_ARGS(Entry, (buffer, len, bm)); 111 Entry* entry = new Entry(buffer, len, bm);
112 this->attachToHead(entry); 112 this->attachToHead(entry);
113 fEntryCount += 1; 113 fEntryCount += 1;
114 } 114 }
115 115
116 /////////////////////////////////////////////////////////////////////////////// 116 ///////////////////////////////////////////////////////////////////////////////
117 117
118 #ifdef SK_DEBUG 118 #ifdef SK_DEBUG
119 119
120 void SkGradientBitmapCache::validate() const { 120 void SkGradientBitmapCache::validate() const {
121 SkASSERT(fEntryCount >= 0 && fEntryCount <= fMaxEntries); 121 SkASSERT(fEntryCount >= 0 && fEntryCount <= fMaxEntries);
(...skipping 22 matching lines...) Expand all
144 entry = entry->fPrev; 144 entry = entry->fPrev;
145 } 145 }
146 SkASSERT(0 == count); 146 SkASSERT(0 == count);
147 } else { 147 } else {
148 SkASSERT(NULL == fHead); 148 SkASSERT(NULL == fHead);
149 SkASSERT(NULL == fTail); 149 SkASSERT(NULL == fTail);
150 } 150 }
151 } 151 }
152 152
153 #endif 153 #endif
OLDNEW
« no previous file with comments | « src/effects/SkTileImageFilter.cpp ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698