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 GrProgramResource_DEFINED | 8 #ifndef GrProgramResource_DEFINED |
9 #define GrProgramResource_DEFINED | 9 #define GrProgramResource_DEFINED |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 private: | 52 private: |
53 /** Called by owning GrProgramElement when the program element is first sche
duled for | 53 /** Called by owning GrProgramElement when the program element is first sche
duled for |
54 execution. */ | 54 execution. */ |
55 void markPendingIO() const; | 55 void markPendingIO() const; |
56 | 56 |
57 /** Called when the program element/draw state is no longer owned by GrDrawT
arget-client code. | 57 /** Called when the program element/draw state is no longer owned by GrDrawT
arget-client code. |
58 This lets the cache know that the drawing code will no longer schedule a
dditional reads or | 58 This lets the cache know that the drawing code will no longer schedule a
dditional reads or |
59 writes to the resource using the program element or draw state. */ | 59 writes to the resource using the program element or draw state. */ |
60 void removeRef() const; | 60 void removeRef() const; |
61 | 61 |
62 friend class GrDrawState; | 62 /** Called to indicate that the previous pending IO is complete. Useful when
the owning object |
| 63 still has refs, so it is not about to destroy this GrProgramResource, bu
t its previously |
| 64 pending executions have been complete. |
| 65 */ |
| 66 void pendingIOComplete() const; |
| 67 |
| 68 friend class GrRODrawState; |
63 friend class GrProgramElement; | 69 friend class GrProgramElement; |
64 | 70 |
65 GrGpuResource* fResource; | 71 GrGpuResource* fResource; |
66 mutable bool fOwnRef; | 72 mutable bool fOwnRef; |
67 mutable bool fPendingIO; | 73 mutable bool fPendingIO; |
68 IOType fIOType; | 74 IOType fIOType; |
69 | 75 |
70 typedef SkNoncopyable INHERITED; | 76 typedef SkNoncopyable INHERITED; |
71 }; | 77 }; |
72 | 78 |
73 #endif | 79 #endif |
OLD | NEW |