OLD | NEW |
---|---|
(Empty) | |
1 | |
2 /* | |
3 * Copyright 2014 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 | |
9 #ifndef GrResourceCache2_DEFINED | |
10 #define GrResourceCache2_DEFINED | |
11 | |
12 #include "GrTypes.h" | |
13 #include "SkTInternalLList.h" | |
14 | |
robertphillips
2014/08/15 19:36:17
Remove either the pre-decl or the #include ?
bsalomon
2014/08/19 15:16:08
Done.
| |
15 class GrGpuResource; | |
16 | |
17 #include "GrGpuResource.h" | |
18 | |
19 /** | |
20 * Eventual replacement for GrResourceCache. Currently it simply holds a list | |
21 * of all GrGpuResource objects for a GrContext. It is used to invalidate all | |
22 * the resources when necessary. | |
23 */ | |
24 class GrResourceCache2 { | |
25 public: | |
26 GrResourceCache2() : fCount(0) {}; | |
27 ~GrResourceCache2(); | |
28 | |
29 void insertResource(GrGpuResource* resource); | |
30 | |
31 void removeResource(GrGpuResource* resource); | |
32 | |
33 void abandonAll(); | |
34 | |
35 void releaseAll(); | |
36 | |
37 private: | |
38 int fCount; | |
39 SkTInternalLList<GrGpuResource> fResources; | |
40 }; | |
41 | |
42 #endif | |
OLD | NEW |