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

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

Issue 1718693002: Add vulkan files into skia repo. (Closed) Base URL: https://skia.googlesource.com/skia.git@merge
Patch Set: fix path Created 4 years, 10 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/GrVkUniformBuffer.h ('k') | src/gpu/vk/GrVkUniformHandler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "GrVkUniformBuffer.h"
9 #include "GrVkGpu.h"
10
11
12 GrVkUniformBuffer* GrVkUniformBuffer::Create(GrVkGpu* gpu, size_t size, bool dyn amic) {
13 if (0 == size) {
14 return nullptr;
15 }
16 GrVkBuffer::Desc desc;
17 desc.fDynamic = dynamic;
18 desc.fType = GrVkBuffer::kUniform_Type;
19 desc.fSizeInBytes = size;
20
21 const GrVkBuffer::Resource* bufferResource = GrVkBuffer::Create(gpu, desc);
22 if (!bufferResource) {
23 return nullptr;
24 }
25
26 GrVkUniformBuffer* buffer = new GrVkUniformBuffer(desc, bufferResource);
27 if (!buffer) {
28 bufferResource->unref(gpu);
29 }
30 return buffer;
31 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkUniformBuffer.h ('k') | src/gpu/vk/GrVkUniformHandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698