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

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

Issue 2193883002: Fix vulkan build (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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/GrVkUniformBuffer.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
11 #include "GrVkResource.h" 11 #include "GrVkResource.h"
12 #include "vk/GrVkDefines.h" 12 #include "vk/GrVkDefines.h"
13 #include "vk/GrVkTypes.h" 13 #include "vk/GrVkTypes.h"
14 14
15 class GrVkGpu; 15 class GrVkGpu;
16 16
17 /** 17 /**
18 * This class serves as the base of GrVk*Buffer classes. It was written to avoid code 18 * This class serves as the base of GrVk*Buffer classes. It was written to avoid code
19 * duplication in those classes. 19 * duplication in those classes.
20 */ 20 */
21 class GrVkBuffer : public SkNoncopyable { 21 class GrVkBuffer : public SkNoncopyable {
22 public: 22 public:
23 ~GrVkBuffer() { 23 virtual ~GrVkBuffer() {
24 // either release or abandon should have been called by the owner of thi s object. 24 // either release or abandon should have been called by the owner of thi s object.
25 SkASSERT(!fResource); 25 SkASSERT(!fResource);
26 } 26 }
27 27
28 VkBuffer buffer() const { return fResource->fBuffer; } 28 VkBuffer buffer() const { return fResource->fBuffer; }
29 const GrVkAlloc& alloc() const { return fResource->fAlloc; } 29 const GrVkAlloc& alloc() const { return fResource->fAlloc; }
30 const GrVkRecycledResource* resource() const { return fResource; } 30 const GrVkRecycledResource* resource() const { return fResource; }
31 size_t size() const { return fDesc.fSizeInBytes; } 31 size_t size() const { return fDesc.fSizeInBytes; }
32 VkDeviceSize offset() const { return fOffset; } 32 VkDeviceSize offset() const { return fOffset; }
33 33
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 Desc fDesc; 105 Desc fDesc;
106 const Resource* fResource; 106 const Resource* fResource;
107 VkDeviceSize fOffset; 107 VkDeviceSize fOffset;
108 void* fMapPtr; 108 void* fMapPtr;
109 109
110 typedef SkNoncopyable INHERITED; 110 typedef SkNoncopyable INHERITED;
111 }; 111 };
112 112
113 #endif 113 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/vk/GrVkUniformBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698