| 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
5 #include "impeller/renderer/shader_function.h"
6
7 namespace impeller {
8
9 ShaderFunction::ShaderFunction(UniqueID parent_library_id,
10 std::string name,
11 ShaderStage stage)
12 : parent_library_id_(parent_library_id),
13 name_(std::move(name)),
14 stage_(stage) {}
15
16 ShaderFunction::~ShaderFunction() = default;
17
18 ShaderStage ShaderFunction::GetStage() const {
19 return stage_;
20 }
21
22 // |Comparable<ShaderFunction>|
23 std::size_t ShaderFunction::GetHash() const {
24 return fml::HashCombine(parent_library_id_, name_, stage_);
25 }
26
27 // |Comparable<ShaderFunction>|
28 bool ShaderFunction::IsEqual(const ShaderFunction& other) const {
29 return parent_library_id_ == other.parent_library_id_ &&
30 name_ == other.name_ && stage_ == other.stage_;
31 }
32
33 } // namespace impeller
impeller::ShaderFunction::~ShaderFunction
virtual ~ShaderFunction()
shader_function.h
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
std
Definition: comparable.h:98
impeller::UniqueID
Definition: comparable.h:19
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