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

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

Issue 2123323002: Vulkan fixes for TesselatingPathRenderer test (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix void* delete 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 // convenience routine for raw buffer creation 75 // convenience routine for raw buffer creation
76 static const Resource* Create(const GrVkGpu* gpu, 76 static const Resource* Create(const GrVkGpu* gpu,
77 const Desc& descriptor); 77 const Desc& descriptor);
78 78
79 GrVkBuffer(const Desc& desc, const GrVkBuffer::Resource* resource) 79 GrVkBuffer(const Desc& desc, const GrVkBuffer::Resource* resource)
80 : fDesc(desc), fResource(resource), fMapPtr(nullptr) { 80 : fDesc(desc), fResource(resource), fMapPtr(nullptr) {
81 } 81 }
82 82
83 void* vkMap(const GrVkGpu* gpu); 83 void* vkMap(const GrVkGpu* gpu);
84 void vkUnmap(const GrVkGpu* gpu); 84 void vkUnmap(GrVkGpu* gpu);
85 // If the caller passes in a non null createdNewBuffer, this function will s et the bool to true 85 // If the caller passes in a non null createdNewBuffer, this function will s et the bool to true
86 // if it creates a new VkBuffer to upload the data to. 86 // if it creates a new VkBuffer to upload the data to.
87 bool vkUpdateData(GrVkGpu* gpu, const void* src, size_t srcSizeInBytes, 87 bool vkUpdateData(GrVkGpu* gpu, const void* src, size_t srcSizeInBytes,
88 bool* createdNewBuffer = nullptr); 88 bool* createdNewBuffer = nullptr);
89 89
90 void vkAbandon(); 90 void vkAbandon();
91 void vkRelease(const GrVkGpu* gpu); 91 void vkRelease(const GrVkGpu* gpu);
92 92
93 private: 93 private:
94 void validate() const; 94 void validate() const;
95 bool vkIsMapped() const; 95 bool vkIsMapped() const;
96 96
97 Desc fDesc; 97 Desc fDesc;
98 const Resource* fResource; 98 const Resource* fResource;
99 void* fMapPtr; 99 void* fMapPtr;
100 100
101 typedef SkNoncopyable INHERITED; 101 typedef SkNoncopyable INHERITED;
102 }; 102 };
103 103
104 #endif 104 #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