Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(683)

Unified Diff: src/gpu/vk/GrVkGpuCommandBuffer.h

Issue 2078483002: Start using GrGpuCommandBuffer in GrDrawTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@memoryWAR
Patch Set: remove errant lines Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/vk/GrVkGpu.cpp ('k') | src/gpu/vk/GrVkGpuCommandBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
};
« no previous file with comments | « src/gpu/vk/GrVkGpu.cpp ('k') | src/gpu/vk/GrVkGpuCommandBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698