| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 writes to the resource using the program element or draw state. It can o
nly be called once. | 68 writes to the resource using the program element or draw state. It can o
nly be called once. |
| 69 */ | 69 */ |
| 70 void removeRef() const; | 70 void removeRef() const; |
| 71 | 71 |
| 72 /** Called to indicate that the previous pending IO is complete. Useful when
the owning object | 72 /** Called to indicate that the previous pending IO is complete. Useful when
the owning object |
| 73 still has refs, so it is not about to destroy this GrGpuResourceRef, but
its previously | 73 still has refs, so it is not about to destroy this GrGpuResourceRef, but
its previously |
| 74 pending executions have been complete. Can only be called if removeRef()
was not previously | 74 pending executions have been complete. Can only be called if removeRef()
was not previously |
| 75 called. */ | 75 called. */ |
| 76 void pendingIOComplete() const; | 76 void pendingIOComplete() const; |
| 77 | 77 |
| 78 friend class GrRODrawState; | 78 friend class GrDrawState; |
| 79 friend class GrOptDrawState; |
| 79 friend class GrProgramElement; | 80 friend class GrProgramElement; |
| 80 | 81 |
| 81 GrGpuResource* fResource; | 82 GrGpuResource* fResource; |
| 82 mutable bool fOwnRef; | 83 mutable bool fOwnRef; |
| 83 mutable bool fPendingIO; | 84 mutable bool fPendingIO; |
| 84 GrIORef::IOType fIOType; | 85 GrIORef::IOType fIOType; |
| 85 | 86 |
| 86 typedef SkNoncopyable INHERITED; | 87 typedef SkNoncopyable INHERITED; |
| 87 }; | 88 }; |
| 88 | 89 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 } | 147 } |
| 147 } | 148 } |
| 148 } | 149 } |
| 149 | 150 |
| 150 T* get() const { return fResource; } | 151 T* get() const { return fResource; } |
| 151 | 152 |
| 152 private: | 153 private: |
| 153 T* fResource; | 154 T* fResource; |
| 154 }; | 155 }; |
| 155 #endif | 156 #endif |
| OLD | NEW |