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

Side by Side Diff: include/lazy/SkLruImageCache.h

Issue 18461007: Fix two leaks & improve leak tracking (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « include/lazy/SkImageCache.h ('k') | include/lazy/SkPurgeableImageCache.h » ('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 #ifndef SkLruImageCache_DEFINED 8 #ifndef SkLruImageCache_DEFINED
9 #define SkLruImageCache_DEFINED 9 #define SkLruImageCache_DEFINED
10 10
11 #include "SkImageCache.h" 11 #include "SkImageCache.h"
12 #include "SkThread.h" 12 #include "SkThread.h"
13 #include "SkTInternalLList.h" 13 #include "SkTInternalLList.h"
14 14
15 class CachedPixels; 15 class CachedPixels;
16 16
17 /** 17 /**
18 * SkImageCache implementation that uses an LRU cache to age out old images. 18 * SkImageCache implementation that uses an LRU cache to age out old images.
19 */ 19 */
20 class SkLruImageCache : public SkImageCache { 20 class SkLruImageCache : public SkImageCache {
21 21
22 public: 22 public:
23 SK_DECLARE_INST_COUNT(SkLruImageCache)
24
23 SkLruImageCache(size_t budget); 25 SkLruImageCache(size_t budget);
24 26
25 virtual ~SkLruImageCache(); 27 virtual ~SkLruImageCache();
26 28
27 #ifdef SK_DEBUG 29 #ifdef SK_DEBUG
28 virtual MemoryStatus getMemoryStatus(ID) const SK_OVERRIDE; 30 virtual MemoryStatus getMemoryStatus(ID) const SK_OVERRIDE;
29 virtual void purgeAllUnpinnedCaches() SK_OVERRIDE; 31 virtual void purgeAllUnpinnedCaches() SK_OVERRIDE;
30 #endif 32 #endif
31 33
32 /** 34 /**
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 */ 82 */
81 void purgeTilAtOrBelow(size_t limit); 83 void purgeTilAtOrBelow(size_t limit);
82 84
83 /** 85 /**
84 * Remove a set of CachedPixels. Mutex must be locked before calling. 86 * Remove a set of CachedPixels. Mutex must be locked before calling.
85 */ 87 */
86 void removePixels(CachedPixels*); 88 void removePixels(CachedPixels*);
87 }; 89 };
88 90
89 #endif // SkLruImageCache_DEFINED 91 #endif // SkLruImageCache_DEFINED
OLDNEW
« no previous file with comments | « include/lazy/SkImageCache.h ('k') | include/lazy/SkPurgeableImageCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698