/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef GrMemoryPool_DEFINED #define GrMemoryPool_DEFINED #include "include/private/base/SkDebug.h" #include "src/base/SkBlockAllocator.h" #include <cstddef> #include <cstdint> #include <memory> #include <type_traits> #ifdef SK_DEBUG #include "src/core/SkTHash.h" #endif /** * Allocates memory in blocks and parcels out space in the blocks for allocation requests. It is * optimized for allocate / release speed over memory efficiency. The interface is designed to be * used to implement operator new and delete overrides. All allocations are expected to be released * before the pool's destructor is called. Allocations will be aligned to sizeof(std::max_align_t). * * All allocated objects must be released back to the memory pool before it can be destroyed. */ class GrMemoryPool { … }; #endif