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

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

Issue 2163673002: Setup system in Vulkan to reuse VkDescriptorSet allocations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit 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 | « src/gpu/vk/GrVkDescriptorSetManager.cpp ('k') | src/gpu/vk/GrVkPipelineState.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 GrVkImage_DEFINED 8 #ifndef GrVkImage_DEFINED
9 #define GrVkImage_DEFINED 9 #define GrVkImage_DEFINED
10 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 fAlloc.fOffset = 0; 103 fAlloc.fOffset = 0;
104 } 104 }
105 105
106 Resource(VkImage image, const GrVkAlloc& alloc, VkImageTiling tiling) 106 Resource(VkImage image, const GrVkAlloc& alloc, VkImageTiling tiling)
107 : fImage(image), fAlloc(alloc), fImageTiling(tiling) {} 107 : fImage(image), fAlloc(alloc), fImageTiling(tiling) {}
108 108
109 ~Resource() override {} 109 ~Resource() override {}
110 110
111 #ifdef SK_TRACE_VK_RESOURCES 111 #ifdef SK_TRACE_VK_RESOURCES
112 void dumpInfo() const override { 112 void dumpInfo() const override {
113 SkDebugf("GrVkImage: %d (%d refs)\n", fImage, this->getRefCnt()); 113 SkDebugf("GrVkImage: %d (%d refs)\n", fImage, this->getRefCnt());
114 } 114 }
115 #endif 115 #endif
116 private: 116 private:
117 void freeGPUData(const GrVkGpu* gpu) const override; 117 void freeGPUData(const GrVkGpu* gpu) const override;
118 118
119 VkImage fImage; 119 VkImage fImage;
120 GrVkAlloc fAlloc; 120 GrVkAlloc fAlloc;
121 VkImageTiling fImageTiling; 121 VkImageTiling fImageTiling;
122 122
123 typedef GrVkResource INHERITED; 123 typedef GrVkResource INHERITED;
124 }; 124 };
125 125
126 // for wrapped textures 126 // for wrapped textures
127 class BorrowedResource : public Resource { 127 class BorrowedResource : public Resource {
128 public: 128 public:
129 BorrowedResource(VkImage image, const GrVkAlloc& alloc, VkImageTiling ti ling) 129 BorrowedResource(VkImage image, const GrVkAlloc& alloc, VkImageTiling ti ling)
130 : Resource(image, alloc, tiling) { 130 : Resource(image, alloc, tiling) {
131 } 131 }
132 private: 132 private:
133 void freeGPUData(const GrVkGpu* gpu) const override; 133 void freeGPUData(const GrVkGpu* gpu) const override;
134 }; 134 };
135 135
136 const Resource* fResource; 136 const Resource* fResource;
137 137
138 friend class GrVkRenderTarget; 138 friend class GrVkRenderTarget;
139 }; 139 };
140 140
141 #endif 141 #endif
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkDescriptorSetManager.cpp ('k') | src/gpu/vk/GrVkPipelineState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698