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

Side by Side Diff: src/images/SkImageRefPool.h

Issue 100183002: Remove SkImageRef and related functionality. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: REBASED Created 6 years, 6 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 | « src/images/SkImageRef.cpp ('k') | src/images/SkImageRefPool.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1
2 /*
3 * Copyright 2011 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8 #ifndef SkImageRefPool_DEFINED
9 #define SkImageRefPool_DEFINED
10
11 #include "SkTypes.h"
12
13 class SkImageRef;
14 class SkImageRef_GlobalPool;
15
16 class SkImageRefPool {
17 public:
18 SkImageRefPool();
19 ~SkImageRefPool();
20
21 size_t getRAMBudget() const { return fRAMBudget; }
22 void setRAMBudget(size_t);
23
24 size_t getRAMUsed() const { return fRAMUsed; }
25 void setRAMUsed(size_t limit);
26
27 void addToHead(SkImageRef*);
28 void addToTail(SkImageRef*);
29 void detach(SkImageRef*);
30
31 void dump() const;
32
33 private:
34 size_t fRAMBudget;
35 size_t fRAMUsed;
36
37 int fCount;
38 SkImageRef* fHead, *fTail;
39
40 int computeCount() const;
41
42 friend class SkImageRef_GlobalPool;
43
44 void justAddedPixels(SkImageRef*);
45 void canLosePixels(SkImageRef*);
46 void purgeIfNeeded();
47 };
48
49 #endif
OLDNEW
« no previous file with comments | « src/images/SkImageRef.cpp ('k') | src/images/SkImageRefPool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698