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

Side by Side Diff: src/lazy/SkLruImageCache.cpp

Issue 98703002: Fix compilation with SK_ENABLE_INST_COUNT=1 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « src/lazy/SkBitmapFactory.cpp ('k') | src/lazy/SkPurgeableImageCache.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 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkLruImageCache.h" 8 #include "SkLruImageCache.h"
9 9
10 SK_DEFINE_INST_COUNT(SkImageCache)
11 SK_DEFINE_INST_COUNT(SkLruImageCache)
12
13 static intptr_t NextGenerationID() { 10 static intptr_t NextGenerationID() {
14 static intptr_t gNextID; 11 static intptr_t gNextID;
15 do { 12 do {
16 gNextID++; 13 gNextID++;
17 } while (SkImageCache::UNINITIALIZED_ID == gNextID); 14 } while (SkImageCache::UNINITIALIZED_ID == gNextID);
18 return gNextID; 15 return gNextID;
19 } 16 }
20 17
21 class CachedPixels : public SkNoncopyable { 18 class CachedPixels : public SkNoncopyable {
22 19
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 CachedPixels* pixels = iter.init(fLRU, Iter::kTail_IterStart); 194 CachedPixels* pixels = iter.init(fLRU, Iter::kTail_IterStart);
198 while (pixels != NULL && fRamUsed > limit) { 195 while (pixels != NULL && fRamUsed > limit) {
199 CachedPixels* prev = iter.prev(); 196 CachedPixels* prev = iter.prev();
200 if (!pixels->isLocked()) { 197 if (!pixels->isLocked()) {
201 this->removePixels(pixels); 198 this->removePixels(pixels);
202 } 199 }
203 pixels = prev; 200 pixels = prev;
204 } 201 }
205 } 202 }
206 } 203 }
OLDNEW
« no previous file with comments | « src/lazy/SkBitmapFactory.cpp ('k') | src/lazy/SkPurgeableImageCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698