| 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 GrVkIndexBuffer_DEFINED | 8 #ifndef GrVkIndexBuffer_DEFINED |
| 9 #define GrVkIndexBuffer_DEFINED | 9 #define GrVkIndexBuffer_DEFINED |
| 10 | 10 |
| 11 #include "GrIndexBuffer.h" | 11 #include "GrIndexBuffer.h" |
| 12 #include "GrVkBuffer.h" | 12 #include "GrVkBuffer.h" |
| 13 #include "vk/GrVkInterface.h" | |
| 14 | 13 |
| 15 class GrVkGpu; | 14 class GrVkGpu; |
| 16 | 15 |
| 17 class GrVkIndexBuffer : public GrIndexBuffer, public GrVkBuffer { | 16 class GrVkIndexBuffer : public GrIndexBuffer, public GrVkBuffer { |
| 18 | 17 |
| 19 public: | 18 public: |
| 20 static GrVkIndexBuffer* Create(GrVkGpu* gpu, size_t size, bool dynamic); | 19 static GrVkIndexBuffer* Create(GrVkGpu* gpu, size_t size, bool dynamic); |
| 21 | 20 |
| 22 protected: | 21 protected: |
| 23 void onAbandon() override; | 22 void onAbandon() override; |
| 24 void onRelease() override; | 23 void onRelease() override; |
| 25 | 24 |
| 26 private: | 25 private: |
| 27 GrVkIndexBuffer(GrVkGpu* gpu, const GrVkBuffer::Desc& desc, | 26 GrVkIndexBuffer(GrVkGpu* gpu, const GrVkBuffer::Desc& desc, |
| 28 const GrVkBuffer::Resource* resource); | 27 const GrVkBuffer::Resource* resource); |
| 29 | 28 |
| 30 void* onMap() override; | 29 void* onMap() override; |
| 31 void onUnmap() override; | 30 void onUnmap() override; |
| 32 bool onUpdateData(const void* src, size_t srcSizeInBytes) override; | 31 bool onUpdateData(const void* src, size_t srcSizeInBytes) override; |
| 33 | 32 |
| 34 GrVkGpu* getVkGpu() const; | 33 GrVkGpu* getVkGpu() const; |
| 35 | 34 |
| 36 typedef GrIndexBuffer INHERITED; | 35 typedef GrIndexBuffer INHERITED; |
| 37 }; | 36 }; |
| 38 | 37 |
| 39 #endif | 38 #endif |
| OLD | NEW |