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

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

Issue 1831133004: Revert of Consolidate GPU buffer implementations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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/GrVkIndexBuffer.cpp ('k') | src/gpu/vk/GrVkTransferBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/gpu/vk/GrVkIndexBuffer.cpp ('k') | src/gpu/vk/GrVkTransferBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698