Flutter Impeller
shader_function.cc
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 
6 
7 namespace impeller {
8 
10  std::string name,
11  ShaderStage stage)
12  : parent_library_id_(parent_library_id),
13  name_(std::move(name)),
14  stage_(stage) {}
15 
17 
19  return stage_;
20 }
21 
22 const std::string& ShaderFunction::GetName() const {
23  return name_;
24 }
25 
26 // |Comparable<ShaderFunction>|
27 std::size_t ShaderFunction::GetHash() const {
28  return fml::HashCombine(parent_library_id_, name_, stage_);
29 }
30 
31 // |Comparable<ShaderFunction>|
32 bool ShaderFunction::IsEqual(const ShaderFunction& other) const {
33  return parent_library_id_ == other.parent_library_id_ &&
34  name_ == other.name_ && stage_ == other.stage_;
35 }
36 
37 } // namespace impeller
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
Definition: comparable.h:95