Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | List of all members
skgpu::MtlMemoryAllocatorImpl Class Reference

#include <MtlMemoryAllocatorImpl.h>

Inheritance diagram for skgpu::MtlMemoryAllocatorImpl:

Classes

class  Alloc
 

Public Member Functions

 ~MtlMemoryAllocatorImpl () override
 
id< MTLBuffer > newBufferWithLength (NSUInteger length, MTLResourceOptions options, sk_sp< skgpu::MtlAlloc > *allocation) override
 
id< MTLTexture > newTextureWithDescriptor (MTLTextureDescriptor *texDesc, sk_sp< skgpu::MtlAlloc > *allocation) override
 

Static Public Member Functions

static sk_sp< MtlMemoryAllocator > Make (id< MTLDevice >)
 

Detailed Description

Definition at line 18 of file MtlMemoryAllocatorImpl.h.

Constructor & Destructor Documentation

◆ ~MtlMemoryAllocatorImpl()

skgpu::MtlMemoryAllocatorImpl::~MtlMemoryAllocatorImpl ( )
inlineoverride

Definition at line 22 of file MtlMemoryAllocatorImpl.h.

22{}

Member Function Documentation

◆ Make()

sk_sp< MtlMemoryAllocator > skgpu::MtlMemoryAllocatorImpl::Make ( id< MTLDevice >  device)
static

Definition at line 12 of file MtlMemoryAllocatorImpl.mm.

12 {
13 return sk_sp<MtlMemoryAllocator>(new MtlMemoryAllocatorImpl(device));
14}
VkDevice device
Definition main.cc:53

◆ newBufferWithLength()

id< MTLBuffer > skgpu::MtlMemoryAllocatorImpl::newBufferWithLength ( NSUInteger  length,
MTLResourceOptions  options,
sk_sp< skgpu::MtlAlloc > *  allocation 
)
override

Definition at line 16 of file MtlMemoryAllocatorImpl.mm.

18 {
19 // TODO: suballocate and fill in Alloc
20 allocation->reset(new Alloc());
22}
const char * options
void reset(T *ptr=nullptr)
Definition SkRefCnt.h:310
id< MTLBuffer > newBufferWithLength(NSUInteger length, MTLResourceOptions options, sk_sp< skgpu::MtlAlloc > *allocation) override
size_t length

◆ newTextureWithDescriptor()

id< MTLTexture > skgpu::MtlMemoryAllocatorImpl::newTextureWithDescriptor ( MTLTextureDescriptor *  texDesc,
sk_sp< skgpu::MtlAlloc > *  allocation 
)
override

Definition at line 24 of file MtlMemoryAllocatorImpl.mm.

25 {
26 // TODO: suballocate and fill in Alloc
27 allocation->reset(new Alloc());
28 return [fDevice newTextureWithDescriptor:texDesc];
29}
id< MTLTexture > newTextureWithDescriptor(MTLTextureDescriptor *texDesc, sk_sp< skgpu::MtlAlloc > *allocation) override

The documentation for this class was generated from the following files: