OLD | NEW |
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 #ifndef GrVkUniformBuffer_DEFINED | 8 #ifndef GrVkUniformBuffer_DEFINED |
9 #define GrVkUniformBuffer_DEFINED | 9 #define GrVkUniformBuffer_DEFINED |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 class Resource : public GrVkBuffer::Resource { | 38 class Resource : public GrVkBuffer::Resource { |
39 public: | 39 public: |
40 Resource(VkBuffer buf, const GrVkAlloc& alloc) | 40 Resource(VkBuffer buf, const GrVkAlloc& alloc) |
41 : INHERITED(buf, alloc, kUniform_Type) {} | 41 : INHERITED(buf, alloc, kUniform_Type) {} |
42 | 42 |
43 void onRecycle(GrVkGpu* gpu) const override; | 43 void onRecycle(GrVkGpu* gpu) const override; |
44 | 44 |
45 typedef GrVkBuffer::Resource INHERITED; | 45 typedef GrVkBuffer::Resource INHERITED; |
46 }; | 46 }; |
47 | 47 |
| 48 const GrVkBuffer::Resource* createResource(GrVkGpu* gpu, |
| 49 const GrVkBuffer::Desc& descripto
r) override; |
| 50 |
48 GrVkUniformBuffer(GrVkGpu* gpu, const GrVkBuffer::Desc& desc, | 51 GrVkUniformBuffer(GrVkGpu* gpu, const GrVkBuffer::Desc& desc, |
49 const GrVkUniformBuffer::Resource* resource) | 52 const GrVkUniformBuffer::Resource* resource) |
50 : INHERITED(desc, resource) | 53 : INHERITED(desc, resource) |
51 , fGpu(gpu) {} | 54 , fGpu(gpu) {} |
52 | 55 |
53 GrVkGpu* fGpu; | 56 GrVkGpu* fGpu; |
54 | 57 |
55 typedef GrVkBuffer INHERITED; | 58 typedef GrVkBuffer INHERITED; |
56 }; | 59 }; |
57 | 60 |
58 #endif | 61 #endif |
OLD | NEW |