Flutter Engine
 
Loading...
Searching...
No Matches
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_LIB_UI_PAINTING_FRAGMENT_PROGRAM_H_
6#define FLUTTER_LIB_UI_PAINTING_FRAGMENT_PROGRAM_H_
7
12
15
16#include <memory>
17#include <string>
18#include <vector>
19
20namespace flutter {
21
22class FragmentShader;
23
24class FragmentProgram : public RefCountedDartWrappable<FragmentProgram> {
25 DEFINE_WRAPPERTYPEINFO();
27
28 public:
29 ~FragmentProgram() override;
30 static void Create(Dart_Handle wrapper);
31
32 std::string initFromAsset(const std::string& asset_name);
33
35 Dart_Handle uniforms_handle,
36 Dart_Handle samplers);
37
38 std::shared_ptr<DlColorSource> MakeDlColorSource(
39 std::shared_ptr<std::vector<uint8_t>> float_uniforms,
40 const std::vector<std::shared_ptr<DlColorSource>>& children);
41
42 std::shared_ptr<DlImageFilter> MakeDlImageFilter(
43 std::shared_ptr<std::vector<uint8_t>> float_uniforms,
44 const std::vector<std::shared_ptr<DlColorSource>>& children);
45
46 private:
48 sk_sp<DlRuntimeEffect> runtime_effect_;
49};
50
51} // namespace flutter
52
53#endif // FLUTTER_LIB_UI_PAINTING_FRAGMENT_PROGRAM_H_
std::shared_ptr< DlImageFilter > MakeDlImageFilter(std::shared_ptr< std::vector< uint8_t > > float_uniforms, const std::vector< std::shared_ptr< DlColorSource > > &children)
std::shared_ptr< DlColorSource > MakeDlColorSource(std::shared_ptr< std::vector< uint8_t > > float_uniforms, const std::vector< std::shared_ptr< DlColorSource > > &children)
fml::RefPtr< FragmentShader > shader(Dart_Handle shader, Dart_Handle uniforms_handle, Dart_Handle samplers)
std::string initFromAsset(const std::string &asset_name)
static void Create(Dart_Handle wrapper)
#define FML_FRIEND_MAKE_REF_COUNTED(T)