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

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

Issue 886313005: make getContentKey() available in GrGpuResource public interface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix resolve error 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 | « no previous file | src/gpu/GrGpuResourceCacheAccess.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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 return fGpuMemorySize; 181 return fGpuMemorySize;
182 } 182 }
183 183
184 /** 184 /**
185 * Gets an id that is unique for this GrGpuResource object. It is static in that it does 185 * Gets an id that is unique for this GrGpuResource object. It is static in that it does
186 * not change when the content of the GrGpuResource object changes. This wil l never return 186 * not change when the content of the GrGpuResource object changes. This wil l never return
187 * 0. 187 * 0.
188 */ 188 */
189 uint32_t getUniqueID() const { return fUniqueID; } 189 uint32_t getUniqueID() const { return fUniqueID; }
190 190
191 /** Returns the current content key for the resource. It will be invalid if the resource has not
192 been cached by its contents. */
193 const GrContentKey& getContentKey() const { return fContentKey; }
194
191 /** 195 /**
192 * Attach a custom data object to this resource. The data will remain attach ed 196 * Attach a custom data object to this resource. The data will remain attach ed
193 * for the lifetime of this resource (until it is abandoned or released). 197 * for the lifetime of this resource (until it is abandoned or released).
194 * Takes a ref on data. Previously attached data, if any, is unrefed. 198 * Takes a ref on data. Previously attached data, if any, is unrefed.
195 * Returns the data argument, for convenience. 199 * Returns the data argument, for convenience.
196 */ 200 */
197 const SkData* setCustomData(const SkData* data); 201 const SkData* setCustomData(const SkData* data);
198 202
199 /** 203 /**
200 * Returns the custom data object that was attached to this resource by 204 * Returns the custom data object that was attached to this resource by
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 LifeCycle fLifeCycle; 291 LifeCycle fLifeCycle;
288 const uint32_t fUniqueID; 292 const uint32_t fUniqueID;
289 293
290 SkAutoTUnref<const SkData> fData; 294 SkAutoTUnref<const SkData> fData;
291 295
292 typedef GrIORef<GrGpuResource> INHERITED; 296 typedef GrIORef<GrGpuResource> INHERITED;
293 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgeable. 297 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgeable.
294 }; 298 };
295 299
296 #endif 300 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrGpuResourceCacheAccess.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698