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

Side by Side Diff: src/gpu/GrResourceCache.h

Issue 1510103002: Attempt to land cache purge again [and regen bot logs if still failing] (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | 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 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef GrResourceCache_DEFINED 9 #ifndef GrResourceCache_DEFINED
10 #define GrResourceCache_DEFINED 10 #define GrResourceCache_DEFINED
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 ~GrResourceCache(); 53 ~GrResourceCache();
54 54
55 // Default maximum number of budgeted resources in the cache. 55 // Default maximum number of budgeted resources in the cache.
56 static const int kDefaultMaxCount = 2 * (1 << 12); 56 static const int kDefaultMaxCount = 2 * (1 << 12);
57 // Default maximum number of bytes of gpu memory of budgeted resources in th e cache. 57 // Default maximum number of bytes of gpu memory of budgeted resources in th e cache.
58 static const size_t kDefaultMaxSize = 96 * (1 << 20); 58 static const size_t kDefaultMaxSize = 96 * (1 << 20);
59 // Default number of flushes a budgeted resources can go unused in the cache before it is 59 // Default number of flushes a budgeted resources can go unused in the cache before it is
60 // purged. Large values disable the feature (as the ring buffer of flush tim estamps would be 60 // purged. Large values disable the feature (as the ring buffer of flush tim estamps would be
61 // large). This is currently the default until we decide to enable this feat ure 61 // large). This is currently the default until we decide to enable this feat ure
62 // of the cache by default. 62 // of the cache by default.
63 static const int kDefaultMaxUnusedFlushes = 1024; 63 static const int kDefaultMaxUnusedFlushes = 64;
64 64
65 /** Used to access functionality needed by GrGpuResource for lifetime manage ment. */ 65 /** Used to access functionality needed by GrGpuResource for lifetime manage ment. */
66 class ResourceAccess; 66 class ResourceAccess;
67 ResourceAccess resourceAccess(); 67 ResourceAccess resourceAccess();
68 68
69 /** 69 /**
70 * Sets the cache limits in terms of number of resources, max gpu memory byt e size, and number 70 * Sets the cache limits in terms of number of resources, max gpu memory byt e size, and number
71 * of GrContext flushes that a resource can be unused before it is evicted. The latter value is 71 * of GrContext flushes that a resource can be unused before it is evicted. The latter value is
72 * a suggestion and there is no promise that a resource will be purged immed iately after it 72 * a suggestion and there is no promise that a resource will be purged immed iately after it
73 * hasn't been used in maxUnusedFlushes flushes. 73 * hasn't been used in maxUnusedFlushes flushes.
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 431
432 friend class GrGpuResource; // To access all the proxy inline methods. 432 friend class GrGpuResource; // To access all the proxy inline methods.
433 friend class GrResourceCache; // To create this type. 433 friend class GrResourceCache; // To create this type.
434 }; 434 };
435 435
436 inline GrResourceCache::ResourceAccess GrResourceCache::resourceAccess() { 436 inline GrResourceCache::ResourceAccess GrResourceCache::resourceAccess() {
437 return ResourceAccess(this); 437 return ResourceAccess(this);
438 } 438 }
439 439
440 #endif 440 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698