/* * Copyright 2020 Google LLC * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SKSL_POOL #define SKSL_POOL #include <cstddef> #include <memory> namespace SkSL { class MemoryPool; /** * Efficiently allocates memory in an SkSL program. Optimized for allocate/release performance over * memory efficiency. * * All allocated memory must be released back to the pool before it can be destroyed or recycled. */ class Pool { … }; /** * If your class inherits from Poolable, its objects will be allocated from the pool. */ class Poolable { … }; /** * Temporarily attaches a pool to the current thread within a scope. */ class AutoAttachPoolToThread { … }; } // namespace SkSL #endif