Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
include
gpu
mtl
MtlMemoryAllocator.h
Go to the documentation of this file.
1
/*
2
* Copyright 2022 Google Inc.
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
8
#ifndef skgpu_MtlMemoryAllocator_DEFINED
9
#define skgpu_MtlMemoryAllocator_DEFINED
10
11
#ifdef __APPLE__
12
13
#ifdef __OBJC__
14
#import <Metal/Metal.h>
15
#endif
16
17
namespace
skgpu
{
18
19
// interface classes for the GPU memory allocator
20
class
MtlAlloc :
public
SkRefCnt
{
21
public
:
22
~MtlAlloc()
override
=
default
;
23
};
24
25
#ifdef __OBJC__
26
class
MtlMemoryAllocator :
public
SkRefCnt
{
27
public
:
28
virtual
id<MTLBuffer> newBufferWithLength(NSUInteger
length
, MTLResourceOptions
options
,
29
sk_sp<MtlAlloc>
* allocation) = 0;
30
virtual
id<MTLTexture> newTextureWithDescriptor(MTLTextureDescriptor* texDesc,
31
sk_sp<MtlAlloc>
* allocation) = 0;
32
};
33
#endif
34
35
}
// namespace skgpu
36
37
#endif
// __APPLE__
38
39
#endif
// skgpu_MtlMemoryAllocator_DEFINED
options
const char * options
Definition
CommonFlagsConfig.cpp:43
SkRefCnt
Definition
SkRefCnt.h:119
sk_sp
Definition
SkRefCnt.h:220
length
size_t length
Definition
key_event_handler.cc:41
skgpu
Definition
GpuTools.h:21
Generated on Fri Apr 26 2024 06:16:11 for Flutter Engine by
1.9.8