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

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

Issue 2159333002: Recycle small uniform buffers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update values 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/vk/GrVkBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkBuffer.h
diff --git a/src/gpu/vk/GrVkBuffer.h b/src/gpu/vk/GrVkBuffer.h
index 232de176ce3eca9b672f55f5eee8e9d046a02363..b400e09916f4580587d29097250e199daed8f30b 100644
--- a/src/gpu/vk/GrVkBuffer.h
+++ b/src/gpu/vk/GrVkBuffer.h
@@ -53,7 +53,7 @@ protected:
bool fDynamic;
};
- class Resource : public GrVkResource {
+ class Resource : public GrVkRecycledResource {
public:
Resource(VkBuffer buf, const GrVkAlloc& alloc, Type type)
: INHERITED(), fBuffer(buf), fAlloc(alloc), fType(type) {}
@@ -70,7 +70,9 @@ protected:
private:
void freeGPUData(const GrVkGpu* gpu) const override;
- typedef GrVkResource INHERITED;
+ void onRecycle(GrVkGpu* gpu) const override { this->unref(gpu); }
+
+ typedef GrVkRecycledResource INHERITED;
};
// convenience routine for raw buffer creation
« 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