OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrCacheable_DEFINED | 8 #ifndef GrCacheable_DEFINED |
9 #define GrCacheable_DEFINED | 9 #define GrCacheable_DEFINED |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... | |
39 virtual bool isValidOnGpu() const = 0; | 39 virtual bool isValidOnGpu() const = 0; |
40 | 40 |
41 void setCacheEntry(GrResourceCacheEntry* cacheEntry) { fCacheEntry = cacheEn try; } | 41 void setCacheEntry(GrResourceCacheEntry* cacheEntry) { fCacheEntry = cacheEn try; } |
42 GrResourceCacheEntry* getCacheEntry() { return fCacheEntry; } | 42 GrResourceCacheEntry* getCacheEntry() { return fCacheEntry; } |
43 | 43 |
44 protected: | 44 protected: |
45 GrCacheable() : fCacheEntry(NULL) {} | 45 GrCacheable() : fCacheEntry(NULL) {} |
46 | 46 |
47 bool isInCache() const { return NULL != fCacheEntry; } | 47 bool isInCache() const { return NULL != fCacheEntry; } |
48 | 48 |
49 void onResourceSizeChanged() const; | |
bsalomon
2014/04/28 21:08:33
We usually use the onSuchAndSuch() naming style fo
Chris Dalton
2014/04/28 22:30:58
Done.
| |
50 | |
49 private: | 51 private: |
50 GrResourceCacheEntry* fCacheEntry; // NULL if not in cache | 52 GrResourceCacheEntry* fCacheEntry; // NULL if not in cache |
51 | 53 |
52 typedef SkRefCnt INHERITED; | 54 typedef SkRefCnt INHERITED; |
53 }; | 55 }; |
54 | 56 |
55 #endif | 57 #endif |
OLD | NEW |