Index: src/gpu/vk/GrVkTransferBuffer.h |
diff --git a/src/gpu/vk/GrVkTransferBuffer.h b/src/gpu/vk/GrVkTransferBuffer.h |
index c6ca2147b38b1caa08ceed5c7892bf4c25fef497..f978df95fd744cf7cc14138c35e1e544e96c5e24 100644 |
--- a/src/gpu/vk/GrVkTransferBuffer.h |
+++ b/src/gpu/vk/GrVkTransferBuffer.h |
@@ -8,13 +8,13 @@ |
#ifndef GrVkTransferBuffer_DEFINED |
#define GrVkTransferBuffer_DEFINED |
-#include "GrBuffer.h" |
+#include "GrTransferBuffer.h" |
#include "GrVkBuffer.h" |
#include "vk/GrVkInterface.h" |
class GrVkGpu; |
-class GrVkTransferBuffer : public GrBuffer, public GrVkBuffer { |
+class GrVkTransferBuffer : public GrTransferBuffer, public GrVkBuffer { |
public: |
static GrVkTransferBuffer* Create(GrVkGpu* gpu, size_t size, GrVkBuffer::Type type); |
@@ -29,9 +29,11 @@ |
void setMemoryBacking(SkTraceMemoryDump* traceMemoryDump, |
const SkString& dumpName) const override; |
- void onMap() override { |
+ void* onMap() override { |
if (!this->wasDestroyed()) { |
- this->GrBuffer::fMapPtr = this->vkMap(this->getVkGpu()); |
+ return this->vkMap(this->getVkGpu()); |
+ } else { |
+ return nullptr; |
} |
} |
@@ -41,17 +43,12 @@ |
} |
} |
- bool onUpdateData(const void* src, size_t srcSizeInBytes) override { |
- SkFAIL("Not implemented for transfer buffers."); |
- return false; |
- } |
- |
GrVkGpu* getVkGpu() const { |
SkASSERT(!this->wasDestroyed()); |
return reinterpret_cast<GrVkGpu*>(this->getGpu()); |
} |
- typedef GrBuffer INHERITED; |
+ typedef GrTransferBuffer INHERITED; |
}; |
#endif |