Index: src/pathops/SkOpTAllocator.h |
diff --git a/src/pathops/SkOpTAllocator.h b/src/pathops/SkOpTAllocator.h |
index c80c12f63b09f9e39219a2495d75e369ae0c21e1..e8835f02e6cb45a3bc7b75ec38d64eb04e0e3bdb 100644 |
--- a/src/pathops/SkOpTAllocator.h |
+++ b/src/pathops/SkOpTAllocator.h |
@@ -19,6 +19,12 @@ public: |
return record; |
} |
+ static T* AllocateArray(SkChunkAlloc* allocator, int count) { |
+ void* ptr = allocator->allocThrow(sizeof(T) * count); |
+ T* record = (T*) ptr; |
+ return record; |
+ } |
+ |
static T* New(SkChunkAlloc* allocator) { |
return new (Allocate(allocator)) T(); |
} |