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

Side by Side Diff: src/gpu/vk/GrVkBuffer.h

Issue 2115993002: Add resource tracking output and command buffer recycling (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments 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 | « no previous file | src/gpu/vk/GrVkCommandBuffer.h » ('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 #ifndef GrVkBuffer_DEFINED 8 #ifndef GrVkBuffer_DEFINED
9 #define GrVkBuffer_DEFINED 9 #define GrVkBuffer_DEFINED
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 size_t fSizeInBytes; 50 size_t fSizeInBytes;
51 Type fType; // vertex buffer, index buffer, etc. 51 Type fType; // vertex buffer, index buffer, etc.
52 bool fDynamic; 52 bool fDynamic;
53 }; 53 };
54 54
55 class Resource : public GrVkResource { 55 class Resource : public GrVkResource {
56 public: 56 public:
57 Resource(VkBuffer buf, const GrVkAlloc& alloc, Type type) 57 Resource(VkBuffer buf, const GrVkAlloc& alloc, Type type)
58 : INHERITED(), fBuffer(buf), fAlloc(alloc), fType(type) {} 58 : INHERITED(), fBuffer(buf), fAlloc(alloc), fType(type) {}
59 59
60 #ifdef SK_TRACE_VK_RESOURCES
61 void dumpInfo() const override {
62 SkDebugf("GrVkBuffer: %d (%d refs)\n", fBuffer, this->getRefCnt());
63 }
64 #endif
60 VkBuffer fBuffer; 65 VkBuffer fBuffer;
61 GrVkAlloc fAlloc; 66 GrVkAlloc fAlloc;
62 Type fType; 67 Type fType;
63 68
64 private: 69 private:
65 void freeGPUData(const GrVkGpu* gpu) const; 70 void freeGPUData(const GrVkGpu* gpu) const;
66 71
67 typedef GrVkResource INHERITED; 72 typedef GrVkResource INHERITED;
68 }; 73 };
69 74
(...skipping 20 matching lines...) Expand all
90 bool vkIsMapped() const; 95 bool vkIsMapped() const;
91 96
92 Desc fDesc; 97 Desc fDesc;
93 const Resource* fResource; 98 const Resource* fResource;
94 void* fMapPtr; 99 void* fMapPtr;
95 100
96 typedef SkNoncopyable INHERITED; 101 typedef SkNoncopyable INHERITED;
97 }; 102 };
98 103
99 #endif 104 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/vk/GrVkCommandBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698