#include "common/MemoryBuffer.h"
#include <algorithm>
#include <cstdlib>
#include "common/debug.h"
namespace angle
{
MemoryBuffer::~MemoryBuffer()
{ … }
bool MemoryBuffer::resize(size_t size)
{ … }
void MemoryBuffer::trim(size_t size)
{ … }
void MemoryBuffer::fill(uint8_t datum)
{ … }
MemoryBuffer::MemoryBuffer(MemoryBuffer &&other) : … { … }
MemoryBuffer &MemoryBuffer::operator=(MemoryBuffer &&other)
{ … }
namespace
{
static constexpr uint32_t kDefaultScratchBufferLifetime = …;
}
ScratchBuffer::ScratchBuffer() : … { … }
ScratchBuffer::ScratchBuffer(uint32_t lifetime) : … { … }
ScratchBuffer::~ScratchBuffer() { … }
ScratchBuffer::ScratchBuffer(ScratchBuffer &&other)
{ … }
ScratchBuffer &ScratchBuffer::operator=(ScratchBuffer &&other)
{ … }
bool ScratchBuffer::get(size_t requestedSize, MemoryBuffer **memoryBufferOut)
{ … }
bool ScratchBuffer::getInitialized(size_t requestedSize,
MemoryBuffer **memoryBufferOut,
uint8_t initValue)
{ … }
bool ScratchBuffer::getImpl(size_t requestedSize,
MemoryBuffer **memoryBufferOut,
Optional<uint8_t> initValue)
{ … }
void ScratchBuffer::tick()
{ … }
void ScratchBuffer::clear()
{ … }
}