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