| 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 GrVkBuffer_DEFINED | 8 #ifndef GrVkBuffer_DEFINED |
| 9 #define GrVkBuffer_DEFINED | 9 #define GrVkBuffer_DEFINED |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 #ifdef SK_TRACE_VK_RESOURCES | 61 #ifdef SK_TRACE_VK_RESOURCES |
| 62 void dumpInfo() const override { | 62 void dumpInfo() const override { |
| 63 SkDebugf("GrVkBuffer: %d (%d refs)\n", fBuffer, this->getRefCnt()); | 63 SkDebugf("GrVkBuffer: %d (%d refs)\n", fBuffer, this->getRefCnt()); |
| 64 } | 64 } |
| 65 #endif | 65 #endif |
| 66 VkBuffer fBuffer; | 66 VkBuffer fBuffer; |
| 67 GrVkAlloc fAlloc; | 67 GrVkAlloc fAlloc; |
| 68 Type fType; | 68 Type fType; |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 void freeGPUData(const GrVkGpu* gpu) const; | 71 void freeGPUData(const GrVkGpu* gpu) const override; |
| 72 | 72 |
| 73 typedef GrVkResource INHERITED; | 73 typedef GrVkResource INHERITED; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 // convenience routine for raw buffer creation | 76 // convenience routine for raw buffer creation |
| 77 static const Resource* Create(const GrVkGpu* gpu, | 77 static const Resource* Create(const GrVkGpu* gpu, |
| 78 const Desc& descriptor); | 78 const Desc& descriptor); |
| 79 | 79 |
| 80 GrVkBuffer(const Desc& desc, const GrVkBuffer::Resource* resource) | 80 GrVkBuffer(const Desc& desc, const GrVkBuffer::Resource* resource) |
| 81 : fDesc(desc), fResource(resource), fOffset(0), fMapPtr(nullptr) { | 81 : fDesc(desc), fResource(resource), fOffset(0), fMapPtr(nullptr) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 97 | 97 |
| 98 Desc fDesc; | 98 Desc fDesc; |
| 99 const Resource* fResource; | 99 const Resource* fResource; |
| 100 VkDeviceSize fOffset; | 100 VkDeviceSize fOffset; |
| 101 void* fMapPtr; | 101 void* fMapPtr; |
| 102 | 102 |
| 103 typedef SkNoncopyable INHERITED; | 103 typedef SkNoncopyable INHERITED; |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 #endif | 106 #endif |
| OLD | NEW |