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

Unified Diff: src/gpu/vk/GrVkIndexBuffer.cpp

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.h ('k') | src/gpu/vk/GrVkTransferBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
}
« no previous file with comments | « src/gpu/vk/GrVkIndexBuffer.h ('k') | src/gpu/vk/GrVkTransferBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698