Index: src/gpu/vk/GrVkVertexBuffer.cpp |
diff --git a/src/gpu/vk/GrVkVertexBuffer.cpp b/src/gpu/vk/GrVkVertexBuffer.cpp |
index 1d3eadb42c87c5ff7e1fe4e37f3fb0341e2160cf..46c6d28f23d2bd7ec8b704635b7f814e58a98732 100644 |
--- a/src/gpu/vk/GrVkVertexBuffer.cpp |
+++ b/src/gpu/vk/GrVkVertexBuffer.cpp |
@@ -10,8 +10,7 @@ |
GrVkVertexBuffer::GrVkVertexBuffer(GrVkGpu* gpu, const GrVkBuffer::Desc& desc, |
const GrVkBuffer::Resource* bufferResource) |
- : INHERITED(gpu, kVertex_GrBufferType, desc.fSizeInBytes, |
- desc.fDynamic ? kDynamic_GrAccessPattern : kStatic_GrAccessPattern, false) |
+ : INHERITED(gpu, desc.fSizeInBytes, desc.fDynamic, false) |
, GrVkBuffer(desc, bufferResource) { |
this->registerWithCache(); |
} |
@@ -47,9 +46,11 @@ |
INHERITED::onAbandon(); |
} |
-void GrVkVertexBuffer::onMap() { |
+void* GrVkVertexBuffer::onMap() { |
if (!this->wasDestroyed()) { |
- this->GrBuffer::fMapPtr = this->vkMap(this->getVkGpu()); |
+ return this->vkMap(this->getVkGpu()); |
+ } else { |
+ return NULL; |
} |
} |