/* * Copyright 2021 Google LLC * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "src/gpu/mtl/MtlMemoryAllocatorImpl.h" namespace skgpu { sk_sp MtlMemoryAllocatorImpl::Make(id device) { return sk_sp(new MtlMemoryAllocatorImpl(device)); } id MtlMemoryAllocatorImpl::newBufferWithLength(NSUInteger length, MTLResourceOptions options, sk_sp* allocation) { // TODO: suballocate and fill in Alloc allocation->reset(new Alloc()); return [fDevice newBufferWithLength:length options:options]; } id MtlMemoryAllocatorImpl::newTextureWithDescriptor(MTLTextureDescriptor* texDesc, sk_sp* allocation) { // TODO: suballocate and fill in Alloc allocation->reset(new Alloc()); return [fDevice newTextureWithDescriptor:texDesc]; } } // namespace skgpu