Index: src/gpu/vk/GrVkGpuCommandBuffer.h |
diff --git a/src/gpu/vk/GrVkGpuCommandBuffer.h b/src/gpu/vk/GrVkGpuCommandBuffer.h |
index b68aa0334c7a547f6fb78279d65775263befc623..2daa98ce1064f84905428e06f4d8d9ffdc73badd 100644 |
--- a/src/gpu/vk/GrVkGpuCommandBuffer.h |
+++ b/src/gpu/vk/GrVkGpuCommandBuffer.h |
@@ -11,8 +11,12 @@ |
#include "GrGpuCommandBuffer.h" |
#include "GrColor.h" |
+#include "GrTypes.h" |
+#include "GrVkPipelineState.h" |
+class GrNonInstancedMesh; |
class GrVkGpu; |
+class GrVkImage; |
class GrVkRenderPass; |
class GrVkRenderTarget; |
class GrVkSecondaryCommandBuffer; |
@@ -20,20 +24,47 @@ class GrVkSecondaryCommandBuffer; |
class GrVkGpuCommandBuffer : public GrGpuCommandBuffer { |
public: |
GrVkGpuCommandBuffer(GrVkGpu* gpu, |
- const GrVkRenderTarget&, |
- LoadAndStoreOp colorOp, GrColor colorClear, |
- LoadAndStoreOp stencilOp, GrColor stencilClear); |
+ GrVkRenderTarget*, |
+ const LoadAndStoreInfo& colorInfo, |
+ const LoadAndStoreInfo& stencilInfo); |
virtual ~GrVkGpuCommandBuffer(); |
void end() override; |
- void submit() override; |
+ void discard(GrRenderTarget* rt) override {} |
private: |
+ GrGpu* gpu() override; |
+ |
+ void onSubmit(const SkIRect& bounds) override; |
+ |
+ // Bind vertex and index buffers |
+ void bindGeometry(const GrPrimitiveProcessor&, const GrNonInstancedMesh&); |
+ |
+ sk_sp<GrVkPipelineState> prepareDrawState(const GrPipeline&, |
+ const GrPrimitiveProcessor&, |
+ GrPrimitiveType, |
+ const GrVkRenderPass&); |
+ |
+ void onDraw(const GrPipeline& pipeline, |
+ const GrPrimitiveProcessor& primProc, |
+ const GrMesh* mesh, |
+ int meshCount) override; |
+ |
+ void onClear(GrRenderTarget* rt, const SkIRect& rect, GrColor color) override; |
+ |
+ void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideClip) override; |
+ |
const GrVkRenderPass* fRenderPass; |
GrVkSecondaryCommandBuffer* fCommandBuffer; |
GrVkGpu* fGpu; |
+ GrVkRenderTarget* fRenderTarget; |
+ VkClearValue fColorClearValue; |
+ |
+ SkTArray<GrVkImage*> fSampledImages; |
+ |
+ bool fIsEmpty; |
typedef GrGpuCommandBuffer INHERITED; |
}; |