Flutter Engine
The Flutter Engine
MtlMemoryAllocatorImpl.mm
Go to the documentation of this file.
1/*
2 * Copyright 2021 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
9
10namespace skgpu {
11
14}
15
17 MTLResourceOptions options,
18 sk_sp<MtlAlloc>* allocation) {
19 // TODO: suballocate and fill in Alloc
20 allocation->reset(new Alloc());
22}
23
24id<MTLTexture> MtlMemoryAllocatorImpl::newTextureWithDescriptor(MTLTextureDescriptor* texDesc,
25 sk_sp<MtlAlloc>* allocation) {
26 // TODO: suballocate and fill in Alloc
27 allocation->reset(new Alloc());
28 return [fDevice newTextureWithDescriptor:texDesc];
29}
30
31} // namespace skgpu
const char * options
void reset(T *ptr=nullptr)
Definition: SkRefCnt.h:310
id< MTLTexture > newTextureWithDescriptor(MTLTextureDescriptor *texDesc, sk_sp< skgpu::MtlAlloc > *allocation) override
id< MTLBuffer > newBufferWithLength(NSUInteger length, MTLResourceOptions options, sk_sp< skgpu::MtlAlloc > *allocation) override
static sk_sp< MtlMemoryAllocator > Make(id< MTLDevice >)
VkDevice device
Definition: main.cc:53
size_t length
Definition: GpuTools.h:21