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

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

Issue 747043004: Use scratch keys for stencil buffers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 6 years 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
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »
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 GrGpuResource_DEFINED 8 #ifndef GrGpuResource_DEFINED
9 #define GrGpuResource_DEFINED 9 #define GrGpuResource_DEFINED
10 10
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 * Called by CacheAccess. 216 * Called by CacheAccess.
217 */ 217 */
218 void abandon(); 218 void abandon();
219 219
220 virtual size_t onGpuMemorySize() const = 0; 220 virtual size_t onGpuMemorySize() const = 0;
221 221
222 // See comments in CacheAccess. 222 // See comments in CacheAccess.
223 bool setContentKey(const GrResourceKey& contentKey); 223 bool setContentKey(const GrResourceKey& contentKey);
224 void setBudgeted(bool countsAgainstBudget); 224 void setBudgeted(bool countsAgainstBudget);
225 void notifyIsPurgable() const; 225 void notifyIsPurgable() const;
226 void removeScratchKey();
226 227
227 #ifdef SK_DEBUG 228 #ifdef SK_DEBUG
228 friend class GrGpu; // for assert in GrGpu to access getGpu 229 friend class GrGpu; // for assert in GrGpu to access getGpu
229 #endif 230 #endif
230 231
231 static uint32_t CreateUniqueID(); 232 static uint32_t CreateUniqueID();
232 233
233 // We're in an internal doubly linked list owned by GrResourceCache2 234 // We're in an internal doubly linked list owned by GrResourceCache2
234 SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrGpuResource); 235 SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrGpuResource);
235 236
(...skipping 29 matching lines...) Expand all
265 mutable size_t fGpuMemorySize; 266 mutable size_t fGpuMemorySize;
266 267
267 uint32_t fFlags; 268 uint32_t fFlags;
268 const uint32_t fUniqueID; 269 const uint32_t fUniqueID;
269 270
270 typedef GrIORef<GrGpuResource> INHERITED; 271 typedef GrIORef<GrGpuResource> INHERITED;
271 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgable. 272 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgable.
272 }; 273 };
273 274
274 #endif 275 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698