16AllocatorGLES::AllocatorGLES(std::shared_ptr<ReactorGLES> reactor)
17 : reactor_(
std::move(reactor)), is_valid_(true) {}
20AllocatorGLES::~AllocatorGLES() =
default;
23bool AllocatorGLES::IsValid()
const {
28std::shared_ptr<DeviceBuffer> AllocatorGLES::OnCreateBuffer(
29 const DeviceBufferDescriptor& desc) {
30 auto backing_store = std::make_shared<Allocation>();
31 if (!backing_store->Truncate(Bytes{desc.size})) {
34 return std::make_shared<DeviceBufferGLES>(desc,
36 std::move(backing_store)
41std::shared_ptr<Texture> AllocatorGLES::OnCreateTexture(
42 const TextureDescriptor& desc,
44 return std::make_shared<TextureGLES>(reactor_, desc, threadsafe);
48ISize AllocatorGLES::GetMaxTextureSizeSupported()
const {
49 return reactor_->GetProcTable().GetCapabilities()->max_texture_size;