Flutter Impeller
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 
14 namespace 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::vector< FilterInput::Ref > Vector
Definition: filter_input.h:33
A 4x4 matrix using column-major storage.
Definition: matrix.h:37