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

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

Issue 2448593002: Remove SkAutoTUnref and SkAutoTDelete from public includes. (Closed)
Patch Set: And Vulcan. Created 4 years, 1 month 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/GrGpuResourceRef.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 28 matching lines...) Expand all
39 * before notifyIsPurgeable(). Moreover, if notifyRefCountIsZero() returns false then 39 * before notifyIsPurgeable(). Moreover, if notifyRefCountIsZero() returns false then
40 * notifyAllRefCntsAreZero() won't be called at all. notifyRefCountIsZero() must return false if the 40 * notifyAllRefCntsAreZero() won't be called at all. notifyRefCountIsZero() must return false if the
41 * object may be deleted after notifyRefCntIsZero() returns. 41 * object may be deleted after notifyRefCntIsZero() returns.
42 * 42 *
43 * GrIORef and GrGpuResource are separate classes for organizational reasons and to be 43 * GrIORef and GrGpuResource are separate classes for organizational reasons and to be
44 * able to give access via friendship to only the functions related to pending I O operations. 44 * able to give access via friendship to only the functions related to pending I O operations.
45 */ 45 */
46 template <typename DERIVED> class GrIORef : public SkNoncopyable { 46 template <typename DERIVED> class GrIORef : public SkNoncopyable {
47 public: 47 public:
48 // Some of the signatures are written to mirror SkRefCnt so that GrGpuResour ce can work with 48 // Some of the signatures are written to mirror SkRefCnt so that GrGpuResour ce can work with
49 // templated helper classes (e.g. SkAutoTUnref). However, we have different categories of 49 // templated helper classes (e.g. sk_sp). However, we have different categor ies of
50 // refs (e.g. pending reads). We also don't require thread safety as GrCache able objects are 50 // refs (e.g. pending reads). We also don't require thread safety as GrCache able objects are
51 // not intended to cross thread boundaries. 51 // not intended to cross thread boundaries.
52 void ref() const { 52 void ref() const {
53 this->validate(); 53 this->validate();
54 ++fRefCnt; 54 ++fRefCnt;
55 } 55 }
56 56
57 void unref() const { 57 void unref() const {
58 this->validate(); 58 this->validate();
59 59
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 SkBudgeted fBudgeted; 301 SkBudgeted fBudgeted;
302 bool fRefsWrappedObjects; 302 bool fRefsWrappedObjects;
303 const uint32_t fUniqueID; 303 const uint32_t fUniqueID;
304 304
305 typedef GrIORef<GrGpuResource> INHERITED; 305 typedef GrIORef<GrGpuResource> INHERITED;
306 friend class GrIORef<GrGpuResource>; // to access notifyAllCntsAreZero and n otifyRefCntIsZero. 306 friend class GrIORef<GrGpuResource>; // to access notifyAllCntsAreZero and n otifyRefCntIsZero.
307 }; 307 };
308 308
309 #endif 309 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | include/gpu/GrGpuResourceRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698