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

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

Issue 1824123002: Fix borrowed GrVkImage::Resource. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | src/gpu/vk/GrVkImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkImage.h
diff --git a/src/gpu/vk/GrVkImage.h b/src/gpu/vk/GrVkImage.h
index eb0f7bf4fe99976f1a2bf8cff7639df2c4f5a324..fbf80f3bb0906f05cadce4f8ce02066ac1d9e1ce 100644
--- a/src/gpu/vk/GrVkImage.h
+++ b/src/gpu/vk/GrVkImage.h
@@ -41,6 +41,14 @@ public:
typedef GrVkResource INHERITED;
};
+ // for wrapped textures
+ class BorrowedResource : public Resource {
+ public:
+ BorrowedResource(VkImage image, VkDeviceMemory alloc, Flags flags)
+ : Resource(image, alloc, flags) {}
+ private:
+ void freeGPUData(const GrVkGpu* gpu) const override;
+ };
GrVkImage(const Resource* imageResource) : fResource(imageResource) {
if (imageResource->fFlags & Resource::kLinearTiling_Flag) {
« no previous file with comments | « no previous file | src/gpu/vk/GrVkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698