| Flutter Impeller |

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 #pragma once
6
7 #include <Metal/Metal.h>
8
9 #include "flutter/fml/macros.h"
10 #include "impeller/base/backend_cast.h"
11 #include "impeller/renderer/shader_function.h"
12
13 namespace impeller {
14
15 class ShaderFunctionMTL final
16 : public ShaderFunction,
17 public BackendCast<ShaderFunctionMTL, ShaderFunction> {
18 public:
19 // |ShaderFunction|
20 ~ShaderFunctionMTL() override;
21
22 id<MTLFunction> GetMTLFunction() const;
23
24 private:
25 friend class ShaderLibraryMTL;
26
27 id<MTLFunction> function_ = nullptr;
28
29 ShaderFunctionMTL(UniqueID parent_library_id,
30 id<MTLFunction> function,
31 std::string name,
32 ShaderStage stage);
33
34 FML_DISALLOW_COPY_AND_ASSIGN(ShaderFunctionMTL);
35 };
36
37 } // namespace impeller
shader_function.h
impeller::ShaderStage
ShaderStage
Definition: shader_types.h:20
impeller::ShaderFunctionMTL::~ShaderFunctionMTL
~ShaderFunctionMTL() override
impeller::ShaderFunction
Definition: shader_function.h:14
backend_cast.h
impeller::ShaderFunctionMTL::GetMTLFunction
id< MTLFunction > GetMTLFunction() const
Definition: shader_function_mtl.mm:18
impeller::ShaderFunctionMTL
Definition: shader_function_mtl.h:15
impeller::BackendCast
Definition: backend_cast.h:12
impeller::ShaderLibraryMTL
Definition: shader_library_mtl.h:22
impeller::UniqueID
Definition: comparable.h:19
impeller
Definition: aiks_context.cc:10