16 AllocatorGLES::AllocatorGLES(std::shared_ptr<ReactorGLES> reactor)
17 : reactor_(
std::move(reactor)), is_valid_(true) {}
20 AllocatorGLES::~AllocatorGLES() =
default;
23 bool AllocatorGLES::IsValid()
const {
28 std::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)
41 std::shared_ptr<Texture> AllocatorGLES::OnCreateTexture(
42 const TextureDescriptor& desc) {
43 return std::make_shared<TextureGLES>(reactor_, desc);
47 ISize AllocatorGLES::GetMaxTextureSizeSupported()
const {
48 return reactor_->GetProcTable().GetCapabilities()->max_texture_size;
AllocationSize< 1u > Bytes