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 #pragma once
6 
7 #include "flutter/fml/hash_combine.h"
8 #include "flutter/fml/macros.h"
11 
12 namespace impeller {
13 
14 class ShaderFunction : public Comparable<ShaderFunction> {
15  public:
16  // |Comparable<ShaderFunction>|
17  virtual ~ShaderFunction();
18 
19  ShaderStage GetStage() const;
20 
21  // |Comparable<ShaderFunction>|
22  std::size_t GetHash() const override;
23 
24  // |Comparable<ShaderFunction>|
25  bool IsEqual(const ShaderFunction& other) const override;
26 
27  protected:
28  ShaderFunction(UniqueID parent_library_id,
29  std::string name,
30  ShaderStage stage);
31 
32  private:
33  UniqueID parent_library_id_;
34  std::string name_;
35  ShaderStage stage_;
36 
37  FML_DISALLOW_COPY_AND_ASSIGN(ShaderFunction);
38 };
39 
40 } // namespace impeller
impeller::ShaderFunction::~ShaderFunction
virtual ~ShaderFunction()
impeller::ShaderStage
ShaderStage
Definition: shader_types.h:20
impeller::ShaderFunction::IsEqual
bool IsEqual(const ShaderFunction &other) const override
Definition: shader_function.cc:28
impeller::ShaderFunction
Definition: shader_function.h:14
impeller::ShaderFunction::GetStage
ShaderStage GetStage() const
Definition: shader_function.cc:18
impeller::Comparable
Definition: comparable.h:32
comparable.h
impeller::UniqueID
Definition: comparable.h:19
shader_types.h
impeller
Definition: aiks_context.cc:10
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:23