Chromium Code Reviews| Index: src/gpu/vk/GrVkResourceProvider.h |
| diff --git a/src/gpu/vk/GrVkResourceProvider.h b/src/gpu/vk/GrVkResourceProvider.h |
| index d4383af96ab3e4a25d0fb849480471727d8ec938..b87a3858ebed6b6c9f3bf20d7d9083f83a536da2 100644 |
| --- a/src/gpu/vk/GrVkResourceProvider.h |
| +++ b/src/gpu/vk/GrVkResourceProvider.h |
| @@ -25,11 +25,12 @@ |
| class GrPipeline; |
| class GrPrimitiveProcessor; |
| class GrTextureParams; |
| -class GrVkPrimaryCommandBuffer; |
| class GrVkGpu; |
| class GrVkPipeline; |
| +class GrVkPrimaryCommandBuffer; |
| class GrVkRenderTarget; |
| class GrVkSampler; |
| +class GrVkSecondaryCommandBuffer; |
| class GrVkResourceProvider { |
| public: |
| @@ -76,10 +77,12 @@ public: |
| const GrVkRenderPass::LoadStoreOps& resolveOps, |
| const GrVkRenderPass::LoadStoreOps& stencilOps); |
| - |
| - GrVkPrimaryCommandBuffer* createPrimaryCommandBuffer(); |
| + GrVkPrimaryCommandBuffer* findOrCreatePrimaryCommandBuffer(); |
| void checkCommandBuffers(); |
| + GrVkSecondaryCommandBuffer* findOrCreateSecondaryCommandBuffer(); |
| + void recycleSecondaryCommandBuffer(GrVkSecondaryCommandBuffer* cb); |
| + |
| // Finds or creates a compatible GrVkDescriptorPool for the requested type and count. |
| // The refcount is incremented and a pointer returned. |
| // TODO: Currently this will just create a descriptor pool without holding onto a ref itself |
| @@ -200,8 +203,13 @@ private: |
| SkSTArray<4, CompatibleRenderPassSet> fRenderPassArray; |
| - // Array of CommandBuffers that are currently in flight |
| + // Array of PrimaryCommandBuffers that are currently in flight |
| SkSTArray<4, GrVkPrimaryCommandBuffer*> fActiveCommandBuffers; |
| + // Array of available primary command buffers that are not in flight |
| + SkSTArray<4, GrVkPrimaryCommandBuffer*> fAvailableCommandBuffers; |
| + |
| + // Array of available secondary command buffers |
| + SkSTArray<4, GrVkSecondaryCommandBuffer*> fAvailableSecondaryCommandBuffers; |
|
egdaniel
2016/07/05 14:18:37
I wonder if we should make this reserve higher tha
jvanverth1
2016/07/06 15:49:23
Done.
|
| // Stores GrVkSampler objects that we've already created so we can reuse them across multiple |
| // GrVkPipelineStates |