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

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

Issue 938943002: Allow GrGpuResources' unique keys to be changed. (Closed) Base URL: https://skia.googlesource.com/skia.git@rename
Patch Set: Address comments Created 5 years, 10 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 | « include/gpu/GrContext.h ('k') | include/gpu/GrResourceKey.h » ('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 * 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 private: 263 private:
264 /** 264 /**
265 * Frees the object in the underlying 3D API. Called by CacheAccess. 265 * Frees the object in the underlying 3D API. Called by CacheAccess.
266 */ 266 */
267 void release(); 267 void release();
268 268
269 virtual size_t onGpuMemorySize() const = 0; 269 virtual size_t onGpuMemorySize() const = 0;
270 270
271 // See comments in CacheAccess and ResourcePriv. 271 // See comments in CacheAccess and ResourcePriv.
272 bool setUniqueKey(const GrUniqueKey&); 272 void setUniqueKey(const GrUniqueKey&);
273 void removeUniqueKey(); 273 void removeUniqueKey();
274 void notifyIsPurgeable() const; 274 void notifyIsPurgeable() const;
275 void removeScratchKey(); 275 void removeScratchKey();
276 void makeBudgeted(); 276 void makeBudgeted();
277 void makeUnbudgeted(); 277 void makeUnbudgeted();
278 278
279 #ifdef SK_DEBUG 279 #ifdef SK_DEBUG
280 friend class GrGpu; // for assert in GrGpu to access getGpu 280 friend class GrGpu; // for assert in GrGpu to access getGpu
281 #endif 281 #endif
282 282
(...skipping 18 matching lines...) Expand all
301 LifeCycle fLifeCycle; 301 LifeCycle fLifeCycle;
302 const uint32_t fUniqueID; 302 const uint32_t fUniqueID;
303 303
304 SkAutoTUnref<const SkData> fData; 304 SkAutoTUnref<const SkData> fData;
305 305
306 typedef GrIORef<GrGpuResource> INHERITED; 306 typedef GrIORef<GrGpuResource> INHERITED;
307 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgeable. 307 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgeable.
308 }; 308 };
309 309
310 #endif 310 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | include/gpu/GrResourceKey.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698