Flutter Engine
 
Loading...
Searching...
No Matches
runtime_effect_filter_contents.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_ENTITY_CONTENTS_FILTERS_RUNTIME_EFFECT_FILTER_CONTENTS_H_
6#define FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_RUNTIME_EFFECT_FILTER_CONTENTS_H_
7
9
10namespace impeller {
11
12/// A filter that applies a runtime effect shader
14 public:
16
18
19 void SetRuntimeStage(std::shared_ptr<RuntimeStage> runtime_stage);
20
21 void SetUniforms(std::shared_ptr<std::vector<uint8_t>> uniforms);
22
24 std::vector<RuntimeEffectContents::TextureInput> texture_inputs);
25
26 private:
27 std::shared_ptr<RuntimeStage> runtime_stage_;
28 std::shared_ptr<std::vector<uint8_t>> uniforms_;
29 std::vector<RuntimeEffectContents::TextureInput> texture_inputs_;
30
31 // |FilterContents|
32 std::optional<Entity> RenderFilter(
33 const FilterInput::Vector& input_textures,
34 const ContentContext& renderer,
35 const Entity& entity,
36 const Matrix& effect_transform,
37 const Rect& coverage,
38 const std::optional<Rect>& coverage_hint) const override;
39
40 // |FilterContents|
41 std::optional<Rect> GetFilterSourceCoverage(
42 const Matrix& effect_transform,
43 const Rect& output_limit) const override;
44
46
48 delete;
49};
50
51} // namespace impeller
52
53#endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_RUNTIME_EFFECT_FILTER_CONTENTS_H_
std::vector< FilterInput::Ref > Vector
A filter that applies a runtime effect shader.
void SetUniforms(std::shared_ptr< std::vector< uint8_t > > uniforms)
void SetTextureInputs(std::vector< RuntimeEffectContents::TextureInput > texture_inputs)
void SetRuntimeStage(std::shared_ptr< RuntimeStage > runtime_stage)
A 4x4 matrix using column-major storage.
Definition matrix.h:37