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

Unified Diff: src/gpu/vk/GrVkBuffer.h

Issue 2018933004: Add offset to memory allocations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix tests Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/vk/GrVkBuffer.h
diff --git a/src/gpu/vk/GrVkBuffer.h b/src/gpu/vk/GrVkBuffer.h
index 141b2a378f3e6fed4a10ca652257ac0ccdcfc457..f7d43c796d592b7ca317afefe82506da71170859 100644
--- a/src/gpu/vk/GrVkBuffer.h
+++ b/src/gpu/vk/GrVkBuffer.h
@@ -10,6 +10,7 @@
#include "GrVkResource.h"
#include "vk/GrVkDefines.h"
+#include "vk/GrVkTypes.h"
class GrVkGpu;
@@ -24,8 +25,8 @@ public:
SkASSERT(!fResource);
}
- VkBuffer buffer() const { return fResource->fBuffer; }
- VkDeviceMemory alloc() const { return fResource->fAlloc; }
+ VkBuffer buffer() const { return fResource->fBuffer; }
+ const GrVkAlloc& alloc() const { return fResource->fAlloc; }
const GrVkResource* resource() const { return fResource; }
size_t size() const { return fDesc.fSizeInBytes; }
@@ -53,10 +54,12 @@ protected:
class Resource : public GrVkResource {
public:
- Resource(VkBuffer buf, VkDeviceMemory alloc) : INHERITED(), fBuffer(buf), fAlloc(alloc) {}
+ Resource(VkBuffer buf, const GrVkAlloc& alloc)
+ : INHERITED(), fBuffer(buf), fAlloc(alloc) {}
+
+ VkBuffer fBuffer;
+ GrVkAlloc fAlloc;
- VkBuffer fBuffer;
- VkDeviceMemory fAlloc;
private:
void freeGPUData(const GrVkGpu* gpu) const;
« no previous file with comments | « include/gpu/vk/GrVkTypes.h ('k') | src/gpu/vk/GrVkBuffer.cpp » ('j') | src/gpu/vk/GrVkBuffer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698