Flutter Impeller
fragment_program.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_TOOLKIT_INTEROP_FRAGMENT_PROGRAM_H_
6 #define FLUTTER_IMPELLER_TOOLKIT_INTEROP_FRAGMENT_PROGRAM_H_
7 
8 #include "flutter/fml/mapping.h"
12 
13 namespace impeller::interop {
14 
15 class FragmentProgram final
16  : public Object<FragmentProgram,
17  IMPELLER_INTERNAL_HANDLE_NAME(ImpellerFragmentProgram)> {
18  public:
19  explicit FragmentProgram(const std::shared_ptr<fml::Mapping>& mapping);
20 
22 
23  FragmentProgram(const FragmentProgram&) = delete;
24 
26 
27  bool IsValid() const;
28 
29  std::shared_ptr<RuntimeStage> FindRuntimeStage(
30  RuntimeStageBackend backend) const;
31 
32  private:
33  RuntimeStage::Map stages_;
34  bool is_valid_ = false;
35 
36  std::set<RuntimeStageBackend> GetAvailableStages() const;
37 };
38 
40 
41 } // namespace impeller::interop
42 
43 #endif // FLUTTER_IMPELLER_TOOLKIT_INTEROP_FRAGMENT_PROGRAM_H_
std::map< RuntimeStageBackend, std::shared_ptr< RuntimeStage > > Map
Definition: runtime_stage.h:24
FragmentProgram(const FragmentProgram &)=delete
std::shared_ptr< RuntimeStage > FindRuntimeStage(RuntimeStageBackend backend) const
FragmentProgram(const std::shared_ptr< fml::Mapping > &mapping)
FragmentProgram & operator=(const FragmentProgram &)=delete
const char * RuntimeStageBackendToString(RuntimeStageBackend backend)