5#ifndef FLUTTER_IMPELLER_BASE_ALLOCATION_H_
6#define FLUTTER_IMPELLER_BASE_ALLOCATION_H_
11#include "flutter/fml/mapping.h"
32 uint8_t* buffer_ =
nullptr;
36 [[nodiscard]]
bool Reserve(
size_t reserved);
38 [[nodiscard]]
bool ReserveNPOT(
size_t reserved);
49 const std::shared_ptr<Allocation>& allocation);
52 std::shared_ptr<const std::string>
string);
uint8_t * GetBuffer() const
size_t GetReservedLength() const
bool Truncate(size_t length, bool npot=true)
static uint32_t NextPowerOfTwoSize(uint32_t x)
std::shared_ptr< fml::Mapping > CreateMappingWithCopy(const uint8_t *contents, size_t length)
std::shared_ptr< fml::Mapping > CreateMappingWithString(std::string string)
std::shared_ptr< fml::Mapping > CreateMappingFromAllocation(const std::shared_ptr< Allocation > &allocation)