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

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

Issue 864343005: Revert of make getContentKey() available in GrGpuResource public interface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
195 /** 191 /**
196 * Attach a custom data object to this resource. The data will remain attach ed 192 * Attach a custom data object to this resource. The data will remain attach ed
197 * for the lifetime of this resource (until it is abandoned or released). 193 * for the lifetime of this resource (until it is abandoned or released).
198 * Takes a ref on data. Previously attached data, if any, is unrefed. 194 * Takes a ref on data. Previously attached data, if any, is unrefed.
199 * Returns the data argument, for convenience. 195 * Returns the data argument, for convenience.
200 */ 196 */
201 const SkData* setCustomData(const SkData* data); 197 const SkData* setCustomData(const SkData* data);
202 198
203 /** 199 /**
204 * Returns the custom data object that was attached to this resource by 200 * Returns the custom data object that was attached to this resource by
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 LifeCycle fLifeCycle; 287 LifeCycle fLifeCycle;
292 const uint32_t fUniqueID; 288 const uint32_t fUniqueID;
293 289
294 SkAutoTUnref<const SkData> fData; 290 SkAutoTUnref<const SkData> fData;
295 291
296 typedef GrIORef<GrGpuResource> INHERITED; 292 typedef GrIORef<GrGpuResource> INHERITED;
297 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgeable. 293 friend class GrIORef<GrGpuResource>; // to access notifyIsPurgeable.
298 }; 294 };
299 295
300 #endif 296 #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