OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrVkRenderPass_DEFINED | 8 #ifndef GrVkRenderPass_DEFINED |
9 #define GrVkRenderPass_DEFINED | 9 #define GrVkRenderPass_DEFINED |
10 | 10 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 bool isCompatible(const GrVkRenderPass& renderPass) const; | 113 bool isCompatible(const GrVkRenderPass& renderPass) const; |
114 | 114 |
115 bool equalLoadStoreOps(const LoadStoreOps& colorOps, | 115 bool equalLoadStoreOps(const LoadStoreOps& colorOps, |
116 const LoadStoreOps& resolveOps, | 116 const LoadStoreOps& resolveOps, |
117 const LoadStoreOps& stencilOps) const; | 117 const LoadStoreOps& stencilOps) const; |
118 | 118 |
119 VkRenderPass vkRenderPass() const { return fRenderPass; } | 119 VkRenderPass vkRenderPass() const { return fRenderPass; } |
120 | 120 |
121 void genKey(GrProcessorKeyBuilder* b) const; | 121 void genKey(GrProcessorKeyBuilder* b) const; |
122 | 122 |
| 123 #ifdef SK_TRACE_VK_RESOURCES |
| 124 void dumpInfo() const override { |
| 125 SkDebugf("GrVkRenderPass: %d (%d refs)\n", fRenderPass, this->getRefCnt(
)); |
| 126 } |
| 127 #endif |
| 128 |
123 private: | 129 private: |
124 GrVkRenderPass(const GrVkRenderPass&); | 130 GrVkRenderPass(const GrVkRenderPass&); |
125 | 131 |
126 void init(const GrVkGpu* gpu, | 132 void init(const GrVkGpu* gpu, |
127 const LoadStoreOps& colorOps, | 133 const LoadStoreOps& colorOps, |
128 const LoadStoreOps& resolveOps, | 134 const LoadStoreOps& resolveOps, |
129 const LoadStoreOps& stencilOps); | 135 const LoadStoreOps& stencilOps); |
130 | 136 |
131 bool isCompatible(const AttachmentsDescriptor&, const AttachmentFlags&) cons
t; | 137 bool isCompatible(const AttachmentsDescriptor&, const AttachmentFlags&) cons
t; |
132 | 138 |
133 void freeGPUData(const GrVkGpu* gpu) const override; | 139 void freeGPUData(const GrVkGpu* gpu) const override; |
134 | 140 |
135 VkRenderPass fRenderPass; | 141 VkRenderPass fRenderPass; |
136 AttachmentFlags fAttachmentFlags; | 142 AttachmentFlags fAttachmentFlags; |
137 AttachmentsDescriptor fAttachmentsDescriptor; | 143 AttachmentsDescriptor fAttachmentsDescriptor; |
138 | 144 |
139 typedef GrVkResource INHERITED; | 145 typedef GrVkResource INHERITED; |
140 }; | 146 }; |
141 | 147 |
142 GR_MAKE_BITFIELD_OPS(GrVkRenderPass::AttachmentFlags); | 148 GR_MAKE_BITFIELD_OPS(GrVkRenderPass::AttachmentFlags); |
143 | 149 |
144 #endif | 150 #endif |
OLD | NEW |