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

Side by Side Diff: src/gpu/vk/GrVkIndexBuffer.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/GrVkGpuCommandBuffer.cpp ('k') | src/gpu/vk/GrVkTransferBuffer.cpp » ('j') | 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 "GrVkIndexBuffer.h" 8 #include "GrVkIndexBuffer.h"
9 #include "GrVkGpu.h" 9 #include "GrVkGpu.h"
10 10
11 GrVkIndexBuffer::GrVkIndexBuffer(GrVkGpu* gpu, const GrVkBuffer::Desc& desc, 11 GrVkIndexBuffer::GrVkIndexBuffer(GrVkGpu* gpu, const GrVkBuffer::Desc& desc,
12 const GrVkBuffer::Resource* bufferResource) 12 const GrVkBuffer::Resource* bufferResource)
13 : INHERITED(gpu, desc.fSizeInBytes, kIndex_GrBufferType, 13 : INHERITED(gpu, desc.fSizeInBytes, kIndex_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 GrVkIndexBuffer* GrVkIndexBuffer::Create(GrVkGpu* gpu, size_t size, bool dynamic ) { 19 GrVkIndexBuffer* GrVkIndexBuffer::Create(GrVkGpu* gpu, size_t size, bool dynamic ) {
20 GrVkBuffer::Desc desc; 20 GrVkBuffer::Desc desc;
21 desc.fDynamic = dynamic; 21 desc.fDynamic = dynamic;
22 desc.fType = GrVkBuffer::kIndex_Type; 22 desc.fType = GrVkBuffer::kIndex_Type;
23 desc.fSizeInBytes = size; 23 desc.fSizeInBytes = size;
24 24
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return this->vkUpdateData(this->getVkGpu(), src, srcSizeInBytes); 65 return this->vkUpdateData(this->getVkGpu(), src, srcSizeInBytes);
66 } else { 66 } else {
67 return false; 67 return false;
68 } 68 }
69 } 69 }
70 70
71 GrVkGpu* GrVkIndexBuffer::getVkGpu() const { 71 GrVkGpu* GrVkIndexBuffer::getVkGpu() const {
72 SkASSERT(!this->wasDestroyed()); 72 SkASSERT(!this->wasDestroyed());
73 return static_cast<GrVkGpu*>(this->getGpu()); 73 return static_cast<GrVkGpu*>(this->getGpu());
74 } 74 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkGpuCommandBuffer.cpp ('k') | src/gpu/vk/GrVkTransferBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698