aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrMemoryPool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrMemoryPool.cpp')
-rw-r--r--src/gpu/GrMemoryPool.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gpu/GrMemoryPool.cpp b/src/gpu/GrMemoryPool.cpp
index 32a3612972..89e8f013ac 100644
--- a/src/gpu/GrMemoryPool.cpp
+++ b/src/gpu/GrMemoryPool.cpp
@@ -10,6 +10,7 @@
#ifdef SK_DEBUG
#include "SkAtomics.h"
#endif
+#include "ops/GrOp.h"
#ifdef SK_DEBUG
#define VALIDATE this->validate()
@@ -17,6 +18,13 @@
#define VALIDATE
#endif
+void GrOpMemoryPool::release(std::unique_ptr<GrOp> op) {
+ GrOp* tmp = op.release();
+ SkASSERT(tmp);
+ tmp->~GrOp();
+ fMemoryPool.release(tmp);
+}
+
constexpr size_t GrMemoryPool::kSmallestMinAllocSize;
GrMemoryPool::GrMemoryPool(size_t preallocSize, size_t minAllocSize) {