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 
12 
13 namespace impeller {
14 
15 class ShaderFunction : public Comparable<ShaderFunction> {
16  public:
17  // |Comparable<ShaderFunction>|
18  virtual ~ShaderFunction();
19 
20  ShaderStage GetStage() const;
21 
22  const std::string& GetName() const;
23 
24  // |Comparable<ShaderFunction>|
25  std::size_t GetHash() const override;
26 
27  // |Comparable<ShaderFunction>|
28  bool IsEqual(const ShaderFunction& other) const override;
29 
30  protected:
31  ShaderFunction(UniqueID parent_library_id,
32  std::string name,
33  ShaderStage stage);
34 
35  private:
36  UniqueID parent_library_id_;
37  std::string name_;
38  ShaderStage stage_;
39 
40  ShaderFunction(const ShaderFunction&) = delete;
41 
42  ShaderFunction& operator=(const ShaderFunction&) = delete;
43 };
44 
45 } // namespace impeller
46 
47 #endif // FLUTTER_IMPELLER_RENDERER_SHADER_FUNCTION_H_
ShaderStage GetStage() const
bool IsEqual(const ShaderFunction &other) const override
ShaderFunction(UniqueID parent_library_id, std::string name, ShaderStage stage)
std::size_t GetHash() const override
const std::string & GetName() const