Index: src/gpu/vk/GrVkImage.cpp |
diff --git a/src/gpu/vk/GrVkImage.cpp b/src/gpu/vk/GrVkImage.cpp |
index d3195e7e8a0a9f41c6f96fe842e7b69aef471b65..bbef1b40e8b136b1182a60d33e6009895d054980 100644 |
--- a/src/gpu/vk/GrVkImage.cpp |
+++ b/src/gpu/vk/GrVkImage.cpp |
@@ -62,7 +62,7 @@ void GrVkImage::setImageLayout(const GrVkGpu* gpu, VkImageLayout newLayout, |
bool GrVkImage::InitImageInfo(const GrVkGpu* gpu, const ImageDesc& imageDesc, GrVkImageInfo* info) { |
VkImage image = 0; |
- VkDeviceMemory alloc; |
+ GrVkAlloc alloc; |
VkImageLayout initialLayout = (VK_IMAGE_TILING_LINEAR == imageDesc.fImageTiling) |
? VK_IMAGE_LAYOUT_PREINITIALIZED |
@@ -118,10 +118,10 @@ bool GrVkImage::InitImageInfo(const GrVkGpu* gpu, const ImageDesc& imageDesc, Gr |
void GrVkImage::DestroyImageInfo(const GrVkGpu* gpu, GrVkImageInfo* info) { |
VK_CALL(gpu, DestroyImage(gpu->device(), info->fImage, nullptr)); |
- VK_CALL(gpu, FreeMemory(gpu->device(), info->fAlloc, nullptr)); |
+ GrVkMemory::FreeImageMemory(gpu, info->fAlloc); |
} |
-void GrVkImage::setNewResource(VkImage image, VkDeviceMemory alloc) { |
+void GrVkImage::setNewResource(VkImage image, const GrVkAlloc& alloc) { |
fResource = new Resource(image, alloc); |
} |
@@ -146,7 +146,7 @@ void GrVkImage::abandonImage() { |
void GrVkImage::Resource::freeGPUData(const GrVkGpu* gpu) const { |
VK_CALL(gpu, DestroyImage(gpu->device(), fImage, nullptr)); |
- VK_CALL(gpu, FreeMemory(gpu->device(), fAlloc, nullptr)); |
+ GrVkMemory::FreeImageMemory(gpu, fAlloc); |
} |
void GrVkImage::BorrowedResource::freeGPUData(const GrVkGpu* gpu) const { |