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

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

Issue 1623653002: skia: Add support for CHROMIUM_image backed textures. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Comments from bsalomon, round four. Created 4 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
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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 */ 253 */
254 void abandon(); 254 void abandon();
255 255
256 /** 256 /**
257 * Dumps memory usage information for this GrGpuResource to traceMemoryDump. 257 * Dumps memory usage information for this GrGpuResource to traceMemoryDump.
258 * Typically, subclasses should not need to override this, and should only 258 * Typically, subclasses should not need to override this, and should only
259 * need to override setMemoryBacking. 259 * need to override setMemoryBacking.
260 **/ 260 **/
261 virtual void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const; 261 virtual void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const;
262 262
263 /**
264 * Whether the resource is reuseable by the resource cache.
265 */
266 virtual bool reuseable() const;
267
263 protected: 268 protected:
264 // This must be called by every GrGpuObject. It should be called once the ob ject is fully 269 // This must be called by every GrGpuObject. It should be called once the ob ject is fully
265 // initialized (i.e. not in a base class constructor). 270 // initialized (i.e. not in a base class constructor).
266 void registerWithCache(); 271 void registerWithCache();
267 272
268 GrGpuResource(GrGpu*, LifeCycle); 273 GrGpuResource(GrGpu*, LifeCycle);
269 virtual ~GrGpuResource(); 274 virtual ~GrGpuResource();
270 275
271 GrGpu* getGpu() const { return fGpu; } 276 GrGpu* getGpu() const { return fGpu; }
272 277
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 LifeCycle fLifeCycle; 349 LifeCycle fLifeCycle;
345 const uint32_t fUniqueID; 350 const uint32_t fUniqueID;
346 351
347 SkAutoTUnref<const SkData> fData; 352 SkAutoTUnref<const SkData> fData;
348 353
349 typedef GrIORef<GrGpuResource> INHERITED; 354 typedef GrIORef<GrGpuResource> INHERITED;
350 friend class GrIORef<GrGpuResource>; // to access notifyAllCntsAreZero and n otifyRefCntIsZero. 355 friend class GrIORef<GrGpuResource>; // to access notifyAllCntsAreZero and n otifyRefCntIsZero.
351 }; 356 };
352 357
353 #endif 358 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698