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

Unified Diff: src/gpu/vk/GrVkCommandBuffer.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/GrVkCaps.cpp ('k') | src/gpu/vk/GrVkCommandBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkCommandBuffer.h
diff --git a/src/gpu/vk/GrVkCommandBuffer.h b/src/gpu/vk/GrVkCommandBuffer.h
index 709e4c6044e7b99dc6479ca402810636257fb97d..87c33c057ae173cd8ea20dd90d454077bcb88116 100644
--- a/src/gpu/vk/GrVkCommandBuffer.h
+++ b/src/gpu/vk/GrVkCommandBuffer.h
@@ -21,8 +21,6 @@ class GrVkTransferBuffer;
class GrVkCommandBuffer : public GrVkResource {
public:
- ~GrVkCommandBuffer() override;
-
void invalidateState();
////////////////////////////////////////////////////////////////////////////
@@ -125,7 +123,6 @@ protected:
, fIsActive(false)
, fActiveRenderPass(rp)
, fCmdBuffer(cmdBuffer)
- , fSubmitFence(VK_NULL_HANDLE)
, fBoundVertexBufferIsValid(false)
, fBoundIndexBufferIsValid(false) {
this->invalidateState();
@@ -142,12 +139,12 @@ protected:
const GrVkRenderPass* fActiveRenderPass;
VkCommandBuffer fCmdBuffer;
- VkFence fSubmitFence;
private:
static const int kInitialTrackedResourcesCount = 32;
void freeGPUData(const GrVkGpu* gpu) const override;
+ virtual void onFreeGPUData(const GrVkGpu* gpu) const = 0;
void abandonSubResources() const override;
VkBuffer fBoundVertexBuffer;
@@ -166,6 +163,8 @@ class GrVkSecondaryCommandBuffer;
class GrVkPrimaryCommandBuffer : public GrVkCommandBuffer {
public:
+ ~GrVkPrimaryCommandBuffer() override;
+
static GrVkPrimaryCommandBuffer* Create(const GrVkGpu* gpu, VkCommandPool cmdPool);
void begin(const GrVkGpu* gpu);
@@ -175,7 +174,11 @@ public:
// in the render pass.
void beginRenderPass(const GrVkGpu* gpu,
const GrVkRenderPass* renderPass,
- const GrVkRenderTarget& target);
+ uint32_t clearCount,
+ const VkClearValue* clearValues,
+ const GrVkRenderTarget& target,
+ const SkIRect& bounds,
+ bool forSecondaryCB);
void endRenderPass(const GrVkGpu* gpu);
// Submits the SecondaryCommandBuffer into this command buffer. It is required that we are
@@ -252,7 +255,13 @@ public:
bool finished(const GrVkGpu* gpu) const;
private:
- explicit GrVkPrimaryCommandBuffer(VkCommandBuffer cmdBuffer) : INHERITED(cmdBuffer) {}
+ explicit GrVkPrimaryCommandBuffer(VkCommandBuffer cmdBuffer)
+ : INHERITED(cmdBuffer)
+ , fSubmitFence(VK_NULL_HANDLE) {}
+
+ void onFreeGPUData(const GrVkGpu* gpu) const override;
+
+ VkFence fSubmitFence;
typedef GrVkCommandBuffer INHERITED;
};
@@ -271,6 +280,8 @@ private:
: INHERITED(cmdBuffer, compatibleRenderPass) {
}
+ void onFreeGPUData(const GrVkGpu* gpu) const override {}
+
friend class GrVkPrimaryCommandBuffer;
typedef GrVkCommandBuffer INHERITED;
« no previous file with comments | « src/gpu/vk/GrVkCaps.cpp ('k') | src/gpu/vk/GrVkCommandBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698