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 |
| 15 class GrGpuResource; |
| 16 |
| 17 /** |
| 18 * Eventual replacement for GrResourceCache. Currently it simply holds a list |
| 19 * of all GrGpuResource objects for a GrContext. It is used to invalidate all |
| 20 * the resources when necessary. |
| 21 */ |
| 22 class GrResourceCache2 { |
| 23 public: |
| 24 GrResourceCache2() : fCount(0) {}; |
| 25 ~GrResourceCache2(); |
| 26 |
| 27 void insertResource(GrGpuResource* resource); |
| 28 |
| 29 void removeResource(GrGpuResource* resource); |
| 30 |
| 31 void abandonAll(); |
| 32 |
| 33 void releaseAll(); |
| 34 |
| 35 private: |
| 36 int fCount; |
| 37 SkTInternalLList<GrGpuResource> fResources; |
| 38 }; |
| 39 |
| 40 #endif |
OLD | NEW |