OLD | NEW |
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 GrGpuResourceRef_DEFINED | 8 #ifndef GrGpuResourceRef_DEFINED |
9 #define GrGpuResourceRef_DEFINED | 9 #define GrGpuResourceRef_DEFINED |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 writes to the resource using the program element or draw state. It can o
nly be called once. | 70 writes to the resource using the program element or draw state. It can o
nly be called once. |
71 */ | 71 */ |
72 void removeRef() const; | 72 void removeRef() const; |
73 | 73 |
74 /** Called to indicate that the previous pending IO is complete. Useful when
the owning object | 74 /** Called to indicate that the previous pending IO is complete. Useful when
the owning object |
75 still has refs, so it is not about to destroy this GrGpuResourceRef, but
its previously | 75 still has refs, so it is not about to destroy this GrGpuResourceRef, but
its previously |
76 pending executions have been complete. Can only be called if removeRef()
was not previously | 76 pending executions have been complete. Can only be called if removeRef()
was not previously |
77 called. */ | 77 called. */ |
78 void pendingIOComplete() const; | 78 void pendingIOComplete() const; |
79 | 79 |
80 friend class GrDrawState; | |
81 friend class GrOptDrawState; | |
82 friend class GrProgramElement; | 80 friend class GrProgramElement; |
83 | 81 |
84 GrGpuResource* fResource; | 82 GrGpuResource* fResource; |
85 mutable bool fOwnRef; | 83 mutable bool fOwnRef; |
86 mutable bool fPendingIO; | 84 mutable bool fPendingIO; |
87 GrIOType fIOType; | 85 GrIOType fIOType; |
88 | 86 |
89 typedef SkNoncopyable INHERITED; | 87 typedef SkNoncopyable INHERITED; |
90 }; | 88 }; |
91 | 89 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 fResource->completedRead(); | 202 fResource->completedRead(); |
205 fResource->completedWrite(); | 203 fResource->completedWrite(); |
206 break; | 204 break; |
207 } | 205 } |
208 } | 206 } |
209 } | 207 } |
210 | 208 |
211 T* fResource; | 209 T* fResource; |
212 }; | 210 }; |
213 #endif | 211 #endif |
OLD | NEW |