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

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

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « src/gpu/GrRenderTargetPriv.h ('k') | src/gpu/GrResourceCache.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
2 /* 1 /*
3 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
4 * 3 *
5 * 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
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
9 #ifndef GrResourceCache_DEFINED 8 #ifndef GrResourceCache_DEFINED
10 #define GrResourceCache_DEFINED 9 #define GrResourceCache_DEFINED
11 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 /** Will not return any resources that match but have pending IO. */ 123 /** Will not return any resources that match but have pending IO. */
125 kRequireNoPendingIO_ScratchFlag = 0x2, 124 kRequireNoPendingIO_ScratchFlag = 0x2,
126 }; 125 };
127 126
128 /** 127 /**
129 * Find a resource that matches a scratch key. 128 * Find a resource that matches a scratch key.
130 */ 129 */
131 GrGpuResource* findAndRefScratchResource(const GrScratchKey& scratchKey, 130 GrGpuResource* findAndRefScratchResource(const GrScratchKey& scratchKey,
132 size_t resourceSize, 131 size_t resourceSize,
133 uint32_t flags); 132 uint32_t flags);
134 133
135 #ifdef SK_DEBUG 134 #ifdef SK_DEBUG
136 // This is not particularly fast and only used for validation, so debug only . 135 // This is not particularly fast and only used for validation, so debug only .
137 int countScratchEntriesForKey(const GrScratchKey& scratchKey) const { 136 int countScratchEntriesForKey(const GrScratchKey& scratchKey) const {
138 return fScratchMap.countForKey(scratchKey); 137 return fScratchMap.countForKey(scratchKey);
139 } 138 }
140 #endif 139 #endif
141 140
142 /** 141 /**
143 * Find a resource that matches a unique key. 142 * Find a resource that matches a unique key.
144 */ 143 */
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 void refAndMakeResourceMRU(GrGpuResource*); 253 void refAndMakeResourceMRU(GrGpuResource*);
255 /// @} 254 /// @}
256 255
257 void resetFlushTimestamps(); 256 void resetFlushTimestamps();
258 void processInvalidUniqueKeys(const SkTArray<GrUniqueKeyInvalidatedMessage>& ); 257 void processInvalidUniqueKeys(const SkTArray<GrUniqueKeyInvalidatedMessage>& );
259 void addToNonpurgeableArray(GrGpuResource*); 258 void addToNonpurgeableArray(GrGpuResource*);
260 void removeFromNonpurgeableArray(GrGpuResource*); 259 void removeFromNonpurgeableArray(GrGpuResource*);
261 bool overBudget() const { return fBudgetedBytes > fMaxBytes || fBudgetedCoun t > fMaxCount; } 260 bool overBudget() const { return fBudgetedBytes > fMaxBytes || fBudgetedCoun t > fMaxCount; }
262 261
263 bool wouldFit(size_t bytes) { 262 bool wouldFit(size_t bytes) {
264 return fBudgetedBytes+bytes <= fMaxBytes && fBudgetedCount+1 <= fMaxCoun t; 263 return fBudgetedBytes+bytes <= fMaxBytes && fBudgetedCount+1 <= fMaxCoun t;
265 } 264 }
266 265
267 uint32_t getNextTimestamp(); 266 uint32_t getNextTimestamp();
268 267
269 #ifdef SK_DEBUG 268 #ifdef SK_DEBUG
270 bool isInCache(const GrGpuResource* r) const; 269 bool isInCache(const GrGpuResource* r) const;
271 void validate() const; 270 void validate() const;
272 #else 271 #else
273 void validate() const {} 272 void validate() const {}
274 #endif 273 #endif
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 430
432 friend class GrGpuResource; // To access all the proxy inline methods. 431 friend class GrGpuResource; // To access all the proxy inline methods.
433 friend class GrResourceCache; // To create this type. 432 friend class GrResourceCache; // To create this type.
434 }; 433 };
435 434
436 inline GrResourceCache::ResourceAccess GrResourceCache::resourceAccess() { 435 inline GrResourceCache::ResourceAccess GrResourceCache::resourceAccess() {
437 return ResourceAccess(this); 436 return ResourceAccess(this);
438 } 437 }
439 438
440 #endif 439 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrRenderTargetPriv.h ('k') | src/gpu/GrResourceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698