Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
impeller
renderer
backend
metal
sampler_library_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_SAMPLER_LIBRARY_MTL_H_
6
#define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_SAMPLER_LIBRARY_MTL_H_
7
8
#include <Metal/Metal.h>
9
10
#include <memory>
11
12
#include "flutter/fml/macros.h"
13
#include "
impeller/base/backend_cast.h
"
14
#include "
impeller/base/comparable.h
"
15
#include "
impeller/core/sampler_descriptor.h
"
16
#include "
impeller/renderer/sampler_library.h
"
17
18
namespace
impeller
{
19
20
class
SamplerLibraryMTL
final
21
:
public
SamplerLibrary
,
22
public
BackendCast
<SamplerLibraryMTL, SamplerLibrary> {
23
public
:
24
// |SamplerLibrary|
25
~SamplerLibraryMTL
()
override
;
26
27
private
:
28
friend
class
ContextMTL
;
29
30
id<MTLDevice> device_ =
nullptr
;
31
SamplerMap
samplers_;
32
33
explicit
SamplerLibraryMTL
(id<MTLDevice>
device
);
34
35
// |SamplerLibrary|
36
const
std::unique_ptr<const Sampler>&
GetSampler
(
37
SamplerDescriptor
descriptor)
override
;
38
39
SamplerLibraryMTL
(
const
SamplerLibraryMTL
&) =
delete
;
40
41
SamplerLibraryMTL
& operator=(
const
SamplerLibraryMTL
&) =
delete
;
42
};
43
44
}
// namespace impeller
45
46
#endif
// FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_SAMPLER_LIBRARY_MTL_H_
backend_cast.h
impeller::BackendCast
Definition
backend_cast.h:11
impeller::ContextMTL
Definition
context_mtl.h:37
impeller::SamplerLibraryMTL
Definition
sampler_library_mtl.h:22
impeller::SamplerLibraryMTL::GetSampler
const std::unique_ptr< const Sampler > & GetSampler(SamplerDescriptor descriptor) override
Retrieve a backend specific sampler object for the given sampler descriptor.
Definition
sampler_library_mtl.mm:18
impeller::SamplerLibraryMTL::~SamplerLibraryMTL
~SamplerLibraryMTL() override
impeller::SamplerLibrary
Definition
sampler_library.h:13
comparable.h
device
VkDevice device
Definition
main.cc:53
impeller
Definition
texture.h:18
impeller::SamplerMap
std::unordered_map< SamplerDescriptor, std::unique_ptr< const Sampler >, ComparableHash< SamplerDescriptor >, ComparableEqual< SamplerDescriptor > > SamplerMap
Definition
sampler.h:35
sampler_descriptor.h
sampler_library.h
impeller::SamplerDescriptor
Definition
sampler_descriptor.h:15
Generated on Fri Apr 26 2024 06:14:12 for Flutter Engine by
1.9.8