Flutter Engine
The Flutter Engine
impeller
renderer
backend
metal
allocator_mtl.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_ALLOCATOR_MTL_H_
6
#define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_ALLOCATOR_MTL_H_
7
8
#include <Metal/Metal.h>
9
10
#include "
impeller/core/allocator.h
"
11
12
namespace
impeller
{
13
14
class
AllocatorMTL
final :
public
Allocator
{
15
public
:
16
AllocatorMTL
();
17
18
// |Allocator|
19
~AllocatorMTL
()
override
;
20
21
private
:
22
friend
class
ContextMTL
;
23
24
id<MTLDevice> device_;
25
std::string allocator_label_;
26
bool
supports_memoryless_targets_ =
false
;
27
bool
supports_uma_ =
false
;
28
bool
is_valid_ =
false
;
29
ISize
max_texture_supported_;
30
31
AllocatorMTL
(id<MTLDevice>
device
, std::string label);
32
33
// |Allocator|
34
bool
IsValid()
const
;
35
36
// |Allocator|
37
std::shared_ptr<DeviceBuffer> OnCreateBuffer(
38
const
DeviceBufferDescriptor
&
desc
)
override
;
39
40
// |Allocator|
41
std::shared_ptr<Texture> OnCreateTexture(
42
const
TextureDescriptor
&
desc
)
override
;
43
44
// |Allocator|
45
uint16_t MinimumBytesPerRow(
PixelFormat
format
)
const override
;
46
47
// |Allocator|
48
ISize
GetMaxTextureSizeSupported()
const override
;
49
50
AllocatorMTL
(
const
AllocatorMTL
&) =
delete
;
51
52
AllocatorMTL
& operator=(
const
AllocatorMTL
&) =
delete
;
53
};
54
55
}
// namespace impeller
56
57
#endif
// FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_ALLOCATOR_MTL_H_
allocator.h
impeller::AllocatorMTL
Definition:
allocator_mtl.h:14
impeller::AllocatorMTL::AllocatorMTL
AllocatorMTL()
impeller::AllocatorMTL::~AllocatorMTL
~AllocatorMTL() override
impeller::Allocator
An object that allocates device memory.
Definition:
allocator.h:22
impeller::ContextMTL
Definition:
context_mtl.h:36
device
VkDevice device
Definition:
main.cc:53
format
uint32_t uint32_t * format
Definition:
fl_texture_registrar_test.cc:41
impeller
Definition:
texture.h:18
impeller::PixelFormat
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
Definition:
formats.h:99
import_conformance_tests.desc
desc
Definition:
import_conformance_tests.py:63
impeller::DeviceBufferDescriptor
Definition:
device_buffer_descriptor.h:14
impeller::TSize
Definition:
size.h:19
impeller::TextureDescriptor
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...
Definition:
texture_descriptor.h:37
Generated on Sun Jun 23 2024 21:55:03 for Flutter Engine by
1.9.4