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

Side by Side Diff: include/gpu/GrCacheable.h

Issue 257093002: Add size change notifications to GrResourceCache (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 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 | « no previous file | include/gpu/GrTexture.h » ('j') | src/gpu/GrResourceCache.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrTexture.h » ('j') | src/gpu/GrResourceCache.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698