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

Side by Side Diff: include/gpu/GrGpuResource.h

Issue 870743002: Allow unbudgeted resources to be recycled by the cache as scratch. (Closed) Base URL: https://skia.googlesource.com/skia.git@ckey
Patch Set: rebase Created 5 years, 11 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 | src/gpu/GrGpuResource.cpp » ('j') | src/gpu/GrResourceCache2.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * 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
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrGpuResource_DEFINED 8 #ifndef GrGpuResource_DEFINED
9 #define GrGpuResource_DEFINED 9 #define GrGpuResource_DEFINED
10 10
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 */ 256 */
257 void release(); 257 void release();
258 258
259 virtual size_t onGpuMemorySize() const = 0; 259 virtual size_t onGpuMemorySize() const = 0;
260 260
261 // See comments in CacheAccess. 261 // See comments in CacheAccess.
262 bool setContentKey(const GrContentKey& contentKey); 262 bool setContentKey(const GrContentKey& contentKey);
263 void notifyIsPurgable() const; 263 void notifyIsPurgable() const;
264 void removeScratchKey(); 264 void removeScratchKey();
265 void makeBudgeted(); 265 void makeBudgeted();
266 void makeUnbudgeted();
266 267
267 #ifdef SK_DEBUG 268 #ifdef SK_DEBUG
268 friend class GrGpu; // for assert in GrGpu to access getGpu 269 friend class GrGpu; // for assert in GrGpu to access getGpu
269 #endif 270 #endif
270 271
271 static uint32_t CreateUniqueID(); 272 static uint32_t CreateUniqueID();
272 273
273 // We're in an internal doubly linked list owned by GrResourceCache2 274 // We're in an internal doubly linked list owned by GrResourceCache2
274 SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrGpuResource); 275 SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrGpuResource);
275 276
(...skipping 10 matching lines...) Expand all
286 LifeCycle fLifeCycle; 287 LifeCycle fLifeCycle;
287 const uint32_t fUniqueID; 288 const uint32_t fUniqueID;
288 289
289 SkAutoTUnref<const SkData> fData; 290 SkAutoTUnref<const SkData> fData;
290 291
291 typedef GrIORef<GrGpuResource> INHERITED; 292 typedef GrIORef<GrGpuResource> INHERITED;
292 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgable. 293 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgable.
293 }; 294 };
294 295
295 #endif 296 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrGpuResource.cpp » ('j') | src/gpu/GrResourceCache2.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698