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

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

Issue 201153023: Adding a new SkSurface factory for generating surfaces from the scratch texture pool. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: build/typo fix Created 6 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
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 void setOverbudgetCallback(PFOverbudgetCB overbudgetCB, void* data) { 206 void setOverbudgetCallback(PFOverbudgetCB overbudgetCB, void* data) {
207 fOverbudgetCB = overbudgetCB; 207 fOverbudgetCB = overbudgetCB;
208 fOverbudgetData = data; 208 fOverbudgetData = data;
209 } 209 }
210 210
211 /** 211 /**
212 * Returns the number of bytes consumed by cached resources. 212 * Returns the number of bytes consumed by cached resources.
213 */ 213 */
214 size_t getCachedResourceBytes() const { return fEntryBytes; } 214 size_t getCachedResourceBytes() const { return fEntryBytes; }
215 215
216 /**
217 * Returns the number of cached resources.
218 */
219 int getCachedResourceCount() const { return fEntryCount; }
220
216 // For a found or added resource to be completely exclusive to the caller 221 // For a found or added resource to be completely exclusive to the caller
217 // both the kNoOtherOwners and kHide flags need to be specified 222 // both the kNoOtherOwners and kHide flags need to be specified
218 enum OwnershipFlags { 223 enum OwnershipFlags {
219 kNoOtherOwners_OwnershipFlag = 0x1, // found/added resource has no other owners 224 kNoOtherOwners_OwnershipFlag = 0x1, // found/added resource has no other owners
220 kHide_OwnershipFlag = 0x2 // found/added resource is hidden from future 'find's 225 kHide_OwnershipFlag = 0x2 // found/added resource is hidden from future 'find's
221 }; 226 };
222 227
223 /** 228 /**
224 * Search for an entry with the same Key. If found, return it. 229 * Search for an entry with the same Key. If found, return it.
225 * If not found, return null. 230 * If not found, return null.
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 GrResourceCache* fCache; 382 GrResourceCache* fCache;
378 }; 383 };
379 #else 384 #else
380 class GrAutoResourceCacheValidate { 385 class GrAutoResourceCacheValidate {
381 public: 386 public:
382 GrAutoResourceCacheValidate(GrResourceCache*) {} 387 GrAutoResourceCacheValidate(GrResourceCache*) {}
383 }; 388 };
384 #endif 389 #endif
385 390
386 #endif 391 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | src/gpu/SkGpuDevice.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698