Flutter Impeller
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 "
impeller/base/backend_cast.h
"
13
#include "
impeller/base/comparable.h
"
14
#include "
impeller/core/sampler_descriptor.h
"
15
#include "
impeller/renderer/sampler_library.h
"
16
17
namespace
impeller
{
18
19
class
SamplerLibraryMTL
final
20
:
public
SamplerLibrary
,
21
public
BackendCast
<SamplerLibraryMTL, SamplerLibrary> {
22
public
:
23
// |SamplerLibrary|
24
~SamplerLibraryMTL
()
override
;
25
26
private
:
27
friend
class
ContextMTL
;
28
29
id<MTLDevice> device_ =
nullptr
;
30
std::vector<std::pair<uint64_t, std::shared_ptr<const Sampler>>> samplers_;
31
32
explicit
SamplerLibraryMTL
(id<MTLDevice> device);
33
34
// |SamplerLibrary|
35
raw_ptr<const Sampler>
GetSampler(
36
const
SamplerDescriptor
& descriptor)
override
;
37
38
SamplerLibraryMTL
(
const
SamplerLibraryMTL
&) =
delete
;
39
40
SamplerLibraryMTL
& operator=(
const
SamplerLibraryMTL
&) =
delete
;
41
};
42
43
}
// namespace impeller
44
45
#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:67
impeller::SamplerLibrary
Definition:
sampler_library.h:14
impeller::SamplerLibraryMTL
Definition:
sampler_library_mtl.h:21
impeller::SamplerLibraryMTL::~SamplerLibraryMTL
~SamplerLibraryMTL() override
impeller::raw_ptr
A wrapper around a raw ptr that adds additional unopt mode only checks.
Definition:
raw_ptr.h:15
comparable.h
impeller
Definition:
allocation.cc:12
sampler_descriptor.h
sampler_library.h
impeller::SamplerDescriptor
Definition:
sampler_descriptor.h:14
impeller
renderer
backend
metal
sampler_library_mtl.h
Generated by
1.9.1