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

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

Issue 2112653002: Add static buffer support (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/GrVkBuffer.cpp » ('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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const Desc& descriptor); 72 const Desc& descriptor);
73 73
74 GrVkBuffer(const Desc& desc, const GrVkBuffer::Resource* resource) 74 GrVkBuffer(const Desc& desc, const GrVkBuffer::Resource* resource)
75 : fDesc(desc), fResource(resource), fMapPtr(nullptr) { 75 : fDesc(desc), fResource(resource), fMapPtr(nullptr) {
76 } 76 }
77 77
78 void* vkMap(const GrVkGpu* gpu); 78 void* vkMap(const GrVkGpu* gpu);
79 void vkUnmap(const GrVkGpu* gpu); 79 void vkUnmap(const GrVkGpu* gpu);
80 // If the caller passes in a non null createdNewBuffer, this function will s et the bool to true 80 // If the caller passes in a non null createdNewBuffer, this function will s et the bool to true
81 // if it creates a new VkBuffer to upload the data to. 81 // if it creates a new VkBuffer to upload the data to.
82 bool vkUpdateData(const GrVkGpu* gpu, const void* src, size_t srcSizeInBytes , 82 bool vkUpdateData(GrVkGpu* gpu, const void* src, size_t srcSizeInBytes,
83 bool* createdNewBuffer = nullptr); 83 bool* createdNewBuffer = nullptr);
84 84
85 void vkAbandon(); 85 void vkAbandon();
86 void vkRelease(const GrVkGpu* gpu); 86 void vkRelease(const GrVkGpu* gpu);
87 87
88 private: 88 private:
89 void validate() const; 89 void validate() const;
90 bool vkIsMapped() const; 90 bool vkIsMapped() const;
91 91
92 Desc fDesc; 92 Desc fDesc;
93 const Resource* fResource; 93 const Resource* fResource;
94 void* fMapPtr; 94 void* fMapPtr;
95 95
96 typedef SkNoncopyable INHERITED; 96 typedef SkNoncopyable INHERITED;
97 }; 97 };
98 98
99 #endif 99 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/vk/GrVkBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698