Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
color_matrix_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_COLOR_MATRIX_FILTER_CONTENTS_H_
6#define FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_COLOR_MATRIX_FILTER_CONTENTS_H_
7
8#include <memory>
9#include <optional>
10
13
14namespace impeller {
15
16// Look at example at: https://github.com/flutter/impeller/pull/132
17
19 public:
21
23
24 void SetMatrix(const ColorMatrix& matrix);
25
26 private:
27 // |FilterContents|
28 std::optional<Entity> RenderFilter(
29 const FilterInput::Vector& input_textures,
30 const ContentContext& renderer,
31 const Entity& entity,
32 const Matrix& effect_transform,
33 const Rect& coverage,
34 const std::optional<Rect>& coverage_hint) const override;
35
36 ColorMatrix matrix_;
37
39
41 delete;
42};
43
44} // namespace impeller
45
46#endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_COLOR_MATRIX_FILTER_CONTENTS_H_
std::optional< Entity > RenderFilter(const FilterInput::Vector &input_textures, const ContentContext &renderer, const Entity &entity, const Matrix &effect_transform, const Rect &coverage, const std::optional< Rect > &coverage_hint) const override
Converts zero or more filter inputs into a render instruction.
std::vector< FilterInput::Ref > Vector
A 4x4 matrix using column-major storage.
Definition matrix.h:37