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

Side by Side Diff: src/gpu/vk/GrVkVertexBuffer.cpp

Issue 2143333002: Add resource provider flag to avoid client-side buffers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add resource provider flag to avoid client-side buffers Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/gpu/vk/GrVkTransferBuffer.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrVkVertexBuffer.h" 8 #include "GrVkVertexBuffer.h"
9 #include "GrVkGpu.h" 9 #include "GrVkGpu.h"
10 10
11 GrVkVertexBuffer::GrVkVertexBuffer(GrVkGpu* gpu, const GrVkBuffer::Desc& desc, 11 GrVkVertexBuffer::GrVkVertexBuffer(GrVkGpu* gpu, const GrVkBuffer::Desc& desc,
12 const GrVkBuffer::Resource* bufferResource) 12 const GrVkBuffer::Resource* bufferResource)
13 : INHERITED(gpu, desc.fSizeInBytes, kVertex_GrBufferType, 13 : INHERITED(gpu, desc.fSizeInBytes, kVertex_GrBufferType,
14 desc.fDynamic ? kDynamic_GrAccessPattern : kStatic_GrAccessPatte rn, false) 14 desc.fDynamic ? kDynamic_GrAccessPattern : kStatic_GrAccessPatte rn)
15 , GrVkBuffer(desc, bufferResource) { 15 , GrVkBuffer(desc, bufferResource) {
16 this->registerWithCache(SkBudgeted::kYes); 16 this->registerWithCache(SkBudgeted::kYes);
17 } 17 }
18 18
19 GrVkVertexBuffer* GrVkVertexBuffer::Create(GrVkGpu* gpu, size_t size, bool dynam ic) { 19 GrVkVertexBuffer* GrVkVertexBuffer::Create(GrVkGpu* gpu, size_t size, bool dynam ic) {
20 GrVkBuffer::Desc desc; 20 GrVkBuffer::Desc desc;
21 desc.fDynamic = dynamic; 21 desc.fDynamic = dynamic;
22 desc.fType = GrVkBuffer::kVertex_Type; 22 desc.fType = GrVkBuffer::kVertex_Type;
23 desc.fSizeInBytes = size; 23 desc.fSizeInBytes = size;
24 24
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 return this->vkUpdateData(this->getVkGpu(), src, srcSizeInBytes); 64 return this->vkUpdateData(this->getVkGpu(), src, srcSizeInBytes);
65 } else { 65 } else {
66 return false; 66 return false;
67 } 67 }
68 } 68 }
69 69
70 GrVkGpu* GrVkVertexBuffer::getVkGpu() const { 70 GrVkGpu* GrVkVertexBuffer::getVkGpu() const {
71 SkASSERT(!this->wasDestroyed()); 71 SkASSERT(!this->wasDestroyed());
72 return static_cast<GrVkGpu*>(this->getGpu()); 72 return static_cast<GrVkGpu*>(this->getGpu());
73 } 73 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkTransferBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698