| 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"
9 #include "impeller/runtime_stage/runtime_stage.h"
10 #include "impeller/toolkit/interop/impeller.h"
11 #include "impeller/toolkit/interop/object.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
21 ~FragmentProgram();
22
23 FragmentProgram(const FragmentProgram&) = delete;
24
25 FragmentProgram& operator=(const FragmentProgram&) = delete;
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
39 const char* RuntimeStageBackendToString(RuntimeStageBackend backend);
40
41 } // namespace impeller::interop
42
43 #endif // FLUTTER_IMPELLER_TOOLKIT_INTEROP_FRAGMENT_PROGRAM_H_
impeller::RuntimeStage::Map
std::map< RuntimeStageBackend, std::shared_ptr< RuntimeStage > > Map
Definition: runtime_stage.h:24
impeller::interop::FragmentProgram
Definition: fragment_program.h:17
impeller::interop::FragmentProgram::FragmentProgram
FragmentProgram(const FragmentProgram &)=delete
impeller::interop::FragmentProgram::~FragmentProgram
~FragmentProgram()
impeller::interop::FragmentProgram::IsValid
bool IsValid() const
Definition: fragment_program.cc:35
impeller::interop::FragmentProgram::FindRuntimeStage
std::shared_ptr< RuntimeStage > FindRuntimeStage(RuntimeStageBackend backend) const
Definition: fragment_program.cc:53
impeller::interop::FragmentProgram::FragmentProgram
FragmentProgram(const std::shared_ptr< fml::Mapping > &mapping)
Definition: fragment_program.cc:11
impeller::interop::FragmentProgram::operator=
FragmentProgram & operator=(const FragmentProgram &)=delete
impeller::interop::Object
Definition: object.h:56
impeller.h
impeller::interop
Definition: context_gles.cc:12
impeller::interop::RuntimeStageBackendToString
const char * RuntimeStageBackendToString(RuntimeStageBackend backend)
Definition: fragment_program.cc:70
impeller::RuntimeStageBackend
RuntimeStageBackend
Definition: runtime_types.h:16
object.h
runtime_stage.h