Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
impeller
renderer
backend
metal
shader_function_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_SHADER_FUNCTION_MTL_H_
6
#define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_SHADER_FUNCTION_MTL_H_
7
8
#include <Metal/Metal.h>
9
10
#include "flutter/fml/macros.h"
11
#include "
impeller/base/backend_cast.h
"
12
#include "
impeller/renderer/shader_function.h
"
13
14
namespace
impeller
{
15
16
class
ShaderFunctionMTL
final
17
:
public
ShaderFunction
,
18
public
BackendCast
<ShaderFunctionMTL, ShaderFunction> {
19
public
:
20
// |ShaderFunction|
21
~ShaderFunctionMTL
()
override
;
22
23
id<MTLFunction>
GetMTLFunction
()
const
;
24
25
using
CompileCallback
= std::function<void(id<MTLFunction>)>;
26
27
void
GetMTLFunctionSpecialized
(
const
std::vector<Scalar>& constants,
28
const
CompileCallback
&
callback
)
const
;
29
30
private
:
31
friend
class
ShaderLibraryMTL
;
32
33
id<MTLFunction> function_ =
nullptr
;
34
id<MTLLibrary> library_ =
nullptr
;
35
36
ShaderFunctionMTL
(
UniqueID
parent_library_id,
37
id<MTLFunction>
function
,
38
id<MTLLibrary> library,
39
std::string
name
,
40
ShaderStage
stage);
41
42
ShaderFunctionMTL
(
const
ShaderFunctionMTL
&) =
delete
;
43
44
ShaderFunctionMTL
& operator=(
const
ShaderFunctionMTL
&) =
delete
;
45
};
46
47
}
// namespace impeller
48
49
#endif
// FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_SHADER_FUNCTION_MTL_H_
backend_cast.h
impeller::BackendCast
Definition
backend_cast.h:11
impeller::ShaderFunctionMTL
Definition
shader_function_mtl.h:18
impeller::ShaderFunctionMTL::~ShaderFunctionMTL
~ShaderFunctionMTL() override
impeller::ShaderFunctionMTL::GetMTLFunctionSpecialized
void GetMTLFunctionSpecialized(const std::vector< Scalar > &constants, const CompileCallback &callback) const
Definition
shader_function_mtl.mm:20
impeller::ShaderFunctionMTL::CompileCallback
std::function< void(id< MTLFunction >)> CompileCallback
Definition
shader_function_mtl.h:25
impeller::ShaderFunctionMTL::GetMTLFunction
id< MTLFunction > GetMTLFunction() const
Definition
shader_function_mtl.mm:42
impeller::ShaderFunction
Definition
shader_function.h:16
impeller::ShaderLibraryMTL
Definition
shader_library_mtl.h:23
callback
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Definition
fl_key_channel_responder.cc:120
function
Dart_NativeFunction function
Definition
fuchsia.cc:51
name
const char * name
Definition
fuchsia.cc:50
impeller
Definition
texture.h:18
impeller::ShaderStage
ShaderStage
Definition
shader_types.h:22
shader_function.h
impeller::UniqueID
Definition
comparable.h:16
Generated on Fri Apr 26 2024 06:14:12 for Flutter Engine by
1.9.8