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

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

Issue 2361093002: Change implementation of flush-count based GrGpuResource purging (Closed)
Patch Set: fix var spelling Created 4 years, 2 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
« no previous file with comments | « no previous file | src/gpu/GrGpuResource.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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 #ifdef SK_DEBUG 281 #ifdef SK_DEBUG
282 friend class GrGpu; // for assert in GrGpu to access getGpu 282 friend class GrGpu; // for assert in GrGpu to access getGpu
283 #endif 283 #endif
284 // An index into a heap when this resource is purgeable or an array when not . This is maintained 284 // An index into a heap when this resource is purgeable or an array when not . This is maintained
285 // by the cache. 285 // by the cache.
286 int fCacheArrayIndex; 286 int fCacheArrayIndex;
287 // This value reflects how recently this resource was accessed in the cache. This is maintained 287 // This value reflects how recently this resource was accessed in the cache. This is maintained
288 // by the cache. 288 // by the cache.
289 uint32_t fTimestamp; 289 uint32_t fTimestamp;
290 uint32_t fExternalFlushCntWhenBecamePurgeable;
290 291
291 static const size_t kInvalidGpuMemorySize = ~static_cast<size_t>(0); 292 static const size_t kInvalidGpuMemorySize = ~static_cast<size_t>(0);
292 GrScratchKey fScratchKey; 293 GrScratchKey fScratchKey;
293 GrUniqueKey fUniqueKey; 294 GrUniqueKey fUniqueKey;
294 295
295 // This is not ref'ed but abandon() or release() will be called before the G rGpu object 296 // This is not ref'ed but abandon() or release() will be called before the G rGpu object
296 // is destroyed. Those calls set will this to NULL. 297 // is destroyed. Those calls set will this to NULL.
297 GrGpu* fGpu; 298 GrGpu* fGpu;
298 mutable size_t fGpuMemorySize; 299 mutable size_t fGpuMemorySize;
299 300
300 SkBudgeted fBudgeted; 301 SkBudgeted fBudgeted;
301 bool fRefsWrappedObjects; 302 bool fRefsWrappedObjects;
302 const uint32_t fUniqueID; 303 const uint32_t fUniqueID;
303 304
304 typedef GrIORef<GrGpuResource> INHERITED; 305 typedef GrIORef<GrGpuResource> INHERITED;
305 friend class GrIORef<GrGpuResource>; // to access notifyAllCntsAreZero and n otifyRefCntIsZero. 306 friend class GrIORef<GrGpuResource>; // to access notifyAllCntsAreZero and n otifyRefCntIsZero.
306 }; 307 };
307 308
308 #endif 309 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrGpuResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698