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

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

Powered by Google App Engine
This is Rietveld 408576698