| Flutter Impeller |

shader_function.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_SHADER_FUNCTION_H_
6 #define FLUTTER_IMPELLER_RENDERER_SHADER_FUNCTION_H_
7
8 #include <string>
9 #include "flutter/fml/hash_combine.h"
10 #include "flutter/fml/macros.h"
11 #include "impeller/base/comparable.h"
12 #include "impeller/core/shader_types.h"
13
14 namespace impeller {
15
16 class ShaderFunction : public Comparable<ShaderFunction> {
17 public:
18 // |Comparable<ShaderFunction>|
19 virtual ~ShaderFunction();
20
21 ShaderStage GetStage() const;
22
23 const std::string& GetName() const;
24
25 // |Comparable<ShaderFunction>|
26 std::size_t GetHash() const override;
27
28 // |Comparable<ShaderFunction>|
29 bool IsEqual(const ShaderFunction& other) const override;
30
31 protected:
32 ShaderFunction(UniqueID parent_library_id,
33 std::string name,
34 ShaderStage stage);
35
36 private:
37 UniqueID parent_library_id_;
38 std::string name_;
39 ShaderStage stage_;
40
41 ShaderFunction(const ShaderFunction&) = delete;
42
43 ShaderFunction& operator=(const ShaderFunction&) = delete;
44 };
45
46 } // namespace impeller
47
48 #endif // FLUTTER_IMPELLER_RENDERER_SHADER_FUNCTION_H_
impeller::ShaderFunction::~ShaderFunction
virtual ~ShaderFunction()
impeller::ShaderStage
ShaderStage
Definition: shader_types.h:22
impeller::ShaderFunction::IsEqual
bool IsEqual(const ShaderFunction &other) const override
Definition: shader_function.cc:32
impeller::ShaderFunction
Definition: shader_function.h:16
impeller::ShaderFunction::GetName
const std::string & GetName() const
Definition: shader_function.cc:22
impeller::ShaderFunction::GetStage
ShaderStage GetStage() const
Definition: shader_function.cc:18
impeller::Comparable
Definition: comparable.h:29
comparable.h
impeller::UniqueID
Definition: comparable.h:16
shader_types.h
impeller
Definition: aiks_blur_unittests.cc:20
impeller::ShaderFunction::ShaderFunction
ShaderFunction(UniqueID parent_library_id, std::string name, ShaderStage stage)
Definition: shader_function.cc:9
impeller::ShaderFunction::GetHash
std::size_t GetHash() const override
Definition: shader_function.cc:27