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

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

Issue 848903004: Require budget decision when creating a RenderTarget SkSurface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address initial comments 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
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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 * Frees the object in the underlying 3D API. Called by CacheAccess. 255 * Frees the object in the underlying 3D API. Called by CacheAccess.
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 GrResourceKey& contentKey); 262 bool setContentKey(const GrResourceKey& contentKey);
263 void notifyIsPurgable() const; 263 void notifyIsPurgable() const;
264 void removeScratchKey(); 264 void removeScratchKey();
265 void makeBudgeted();
265 266
266 #ifdef SK_DEBUG 267 #ifdef SK_DEBUG
267 friend class GrGpu; // for assert in GrGpu to access getGpu 268 friend class GrGpu; // for assert in GrGpu to access getGpu
268 #endif 269 #endif
269 270
270 static uint32_t CreateUniqueID(); 271 static uint32_t CreateUniqueID();
271 272
272 // We're in an internal doubly linked list owned by GrResourceCache2 273 // We're in an internal doubly linked list owned by GrResourceCache2
273 SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrGpuResource); 274 SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrGpuResource);
274 275
(...skipping 19 matching lines...) Expand all
294 LifeCycle fLifeCycle; 295 LifeCycle fLifeCycle;
295 const uint32_t fUniqueID; 296 const uint32_t fUniqueID;
296 297
297 SkAutoTUnref<const SkData> fData; 298 SkAutoTUnref<const SkData> fData;
298 299
299 typedef GrIORef<GrGpuResource> INHERITED; 300 typedef GrIORef<GrGpuResource> INHERITED;
300 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgable. 301 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgable.
301 }; 302 };
302 303
303 #endif 304 #endif
OLDNEW
« no previous file with comments | « include/core/SkSurface.h ('k') | src/gpu/GrGpuResource.cpp » ('j') | tests/SurfaceTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698