Flutter Impeller
runtime_stage.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 <memory>
8 #include <string>
9 
10 #include "flutter/fml/macros.h"
11 #include "flutter/fml/mapping.h"
12 
14 
15 namespace impeller {
16 
17 class RuntimeStage {
18  public:
19  explicit RuntimeStage(std::shared_ptr<fml::Mapping> payload);
20 
21  ~RuntimeStage();
24 
25  bool IsValid() const;
26 
28 
29  const std::vector<RuntimeUniformDescription>& GetUniforms() const;
30 
31  const std::string& GetEntrypoint() const;
32 
33  const RuntimeUniformDescription* GetUniform(const std::string& name) const;
34 
35  const std::shared_ptr<fml::Mapping>& GetCodeMapping() const;
36 
37  const std::shared_ptr<fml::Mapping>& GetSkSLMapping() const;
38 
39  bool IsDirty() const;
40 
41  void SetClean();
42 
43  private:
45  std::shared_ptr<fml::Mapping> payload_;
46  std::string entrypoint_;
47  std::shared_ptr<fml::Mapping> code_mapping_;
48  std::shared_ptr<fml::Mapping> sksl_mapping_;
49  std::vector<RuntimeUniformDescription> uniforms_;
50  bool is_valid_ = false;
51  bool is_dirty_ = true;
52 
53  FML_DISALLOW_COPY_AND_ASSIGN(RuntimeStage);
54 };
55 
56 } // namespace impeller
impeller::RuntimeStage::~RuntimeStage
~RuntimeStage()
impeller::RuntimeUniformDescription
Definition: runtime_types.h:42
impeller::RuntimeStage::GetShaderStage
RuntimeShaderStage GetShaderStage() const
Definition: runtime_stage.cc:143
impeller::RuntimeShaderStage
RuntimeShaderStage
Definition: runtime_types.h:29
impeller::RuntimeStage
Definition: runtime_stage.h:17
runtime_types.h
impeller::RuntimeStage::GetUniforms
const std::vector< RuntimeUniformDescription > & GetUniforms() const
Definition: runtime_stage.cc:124
impeller::RuntimeShaderStage::kVertex
@ kVertex
impeller::RuntimeStage::operator=
RuntimeStage & operator=(RuntimeStage &&)
impeller::RuntimeStage::GetUniform
const RuntimeUniformDescription * GetUniform(const std::string &name) const
Definition: runtime_stage.cc:129
impeller::RuntimeStage::RuntimeStage
RuntimeStage(std::shared_ptr< fml::Mapping > payload)
Definition: runtime_stage.cc:62
impeller::RuntimeStage::SetClean
void SetClean()
Definition: runtime_stage.cc:151
impeller::RuntimeStage::IsValid
bool IsValid() const
Definition: runtime_stage.cc:112
impeller::RuntimeStage::GetSkSLMapping
const std::shared_ptr< fml::Mapping > & GetSkSLMapping() const
Definition: runtime_stage.cc:120
impeller::RuntimeStage::IsDirty
bool IsDirty() const
Definition: runtime_stage.cc:147
impeller::RuntimeStage::GetEntrypoint
const std::string & GetEntrypoint() const
Definition: runtime_stage.cc:139
impeller
Definition: aiks_context.cc:10
impeller::RuntimeStage::GetCodeMapping
const std::shared_ptr< fml::Mapping > & GetCodeMapping() const
Definition: runtime_stage.cc:116