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

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

Issue 991783003: Increase maximum gpu resources from 1024 to 4096 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | 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 9
10 #include "GrResourceCache.h" 10 #include "GrResourceCache.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class GrResourceCache::AutoValidate : ::SkNoncopyable { 49 class GrResourceCache::AutoValidate : ::SkNoncopyable {
50 public: 50 public:
51 AutoValidate(GrResourceCache* cache) : fCache(cache) { cache->validate(); } 51 AutoValidate(GrResourceCache* cache) : fCache(cache) { cache->validate(); }
52 ~AutoValidate() { fCache->validate(); } 52 ~AutoValidate() { fCache->validate(); }
53 private: 53 private:
54 GrResourceCache* fCache; 54 GrResourceCache* fCache;
55 }; 55 };
56 56
57 ////////////////////////////////////////////////////////////////////////////// 57 //////////////////////////////////////////////////////////////////////////////
58 58
59 static const int kDefaultMaxCount = 2 * (1 << 10); 59 static const int kDefaultMaxCount = 2 * (1 << 12);
60 static const size_t kDefaultMaxSize = 96 * (1 << 20); 60 static const size_t kDefaultMaxSize = 96 * (1 << 20);
61 61
62 GrResourceCache::GrResourceCache() 62 GrResourceCache::GrResourceCache()
63 : fTimestamp(0) 63 : fTimestamp(0)
64 , fMaxCount(kDefaultMaxCount) 64 , fMaxCount(kDefaultMaxCount)
65 , fMaxBytes(kDefaultMaxSize) 65 , fMaxBytes(kDefaultMaxSize)
66 #if GR_CACHE_STATS 66 #if GR_CACHE_STATS
67 , fHighWaterCount(0) 67 , fHighWaterCount(0)
68 , fHighWaterBytes(0) 68 , fHighWaterBytes(0)
69 , fBudgetedHighWaterCount(0) 69 , fBudgetedHighWaterCount(0)
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 return true; 630 return true;
631 } 631 }
632 if (index < fNonpurgeableResources.count() && fNonpurgeableResources[index] == resource) { 632 if (index < fNonpurgeableResources.count() && fNonpurgeableResources[index] == resource) {
633 return true; 633 return true;
634 } 634 }
635 SkDEBUGFAIL("Resource index should be -1 or the resource should be in the ca che."); 635 SkDEBUGFAIL("Resource index should be -1 or the resource should be in the ca che.");
636 return false; 636 return false;
637 } 637 }
638 638
639 #endif 639 #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