Flutter Engine
The Flutter Engine
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
#include "
include/core/SkRefCnt.h
"
12
13
#ifdef __APPLE__
14
15
#ifdef __OBJC__
16
#import <Metal/Metal.h>
17
#endif
18
19
namespace
skgpu
{
20
21
// interface classes for the GPU memory allocator
22
class
MtlAlloc :
public
SkRefCnt
{
23
public
:
24
~MtlAlloc()
override
=
default
;
25
};
26
27
#ifdef __OBJC__
28
class
MtlMemoryAllocator :
public
SkRefCnt
{
29
public
:
30
virtual
id<MTLBuffer> newBufferWithLength(NSUInteger
length
, MTLResourceOptions
options
,
31
sk_sp<MtlAlloc>
* allocation) = 0;
32
virtual
id<MTLTexture> newTextureWithDescriptor(MTLTextureDescriptor* texDesc,
33
sk_sp<MtlAlloc>
* allocation) = 0;
34
};
35
#endif
36
37
}
// namespace skgpu
38
39
#endif
// __APPLE__
40
41
#endif
// skgpu_MtlMemoryAllocator_DEFINED
options
const char * options
Definition:
CommonFlagsConfig.cpp:43
SkRefCnt.h
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 Sun Jun 23 2024 21:56:03 for Flutter Engine by
1.9.4