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

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

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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/GrRenderTarget.cpp ('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 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 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 10
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 * is called. 174 * is called.
175 */ 175 */
176 void addResource(const GrResourceKey& key, 176 void addResource(const GrResourceKey& key,
177 GrGpuResource* resource, 177 GrGpuResource* resource,
178 uint32_t ownershipFlags = 0); 178 uint32_t ownershipFlags = 0);
179 179
180 /** 180 /**
181 * Determines if the cache contains an entry matching a key. If a matching 181 * Determines if the cache contains an entry matching a key. If a matching
182 * entry exists but was detached then it will not be found. 182 * entry exists but was detached then it will not be found.
183 */ 183 */
184 bool hasKey(const GrResourceKey& key) const { return NULL != fCache.find(key ); } 184 bool hasKey(const GrResourceKey& key) const { return SkToBool(fCache.find(ke y)); }
185 185
186 /** 186 /**
187 * Hide 'entry' so that future searches will not find it. Such 187 * Hide 'entry' so that future searches will not find it. Such
188 * hidden entries will not be purged. The entry still counts against 188 * hidden entries will not be purged. The entry still counts against
189 * the cache's budget and should be made non-exclusive when exclusive access 189 * the cache's budget and should be made non-exclusive when exclusive access
190 * is no longer needed. 190 * is no longer needed.
191 */ 191 */
192 void makeExclusive(GrResourceCacheEntry* entry); 192 void makeExclusive(GrResourceCacheEntry* entry);
193 193
194 /** 194 /**
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 GrResourceCache* fCache; 307 GrResourceCache* fCache;
308 }; 308 };
309 #else 309 #else
310 class GrAutoResourceCacheValidate { 310 class GrAutoResourceCacheValidate {
311 public: 311 public:
312 GrAutoResourceCacheValidate(GrResourceCache*) {} 312 GrAutoResourceCacheValidate(GrResourceCache*) {}
313 }; 313 };
314 #endif 314 #endif
315 315
316 #endif 316 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrRenderTarget.cpp ('k') | src/gpu/GrResourceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698