| Flutter Impeller |

color_filter.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_COLOR_FILTER_H_
6 #define FLUTTER_IMPELLER_TOOLKIT_INTEROP_COLOR_FILTER_H_
7
8 #include "flutter/display_list/effects/dl_color_filter.h"
9 #include "impeller/toolkit/interop/formats.h"
10 #include "impeller/toolkit/interop/impeller.h"
11 #include "impeller/toolkit/interop/object.h"
12
13 namespace impeller::interop {
14
15 class ColorFilter final
16 : public Object<ColorFilter,
17 IMPELLER_INTERNAL_HANDLE_NAME(ImpellerColorFilter)> {
18 public:
19 static ScopedObject<ColorFilter> MakeBlend(Color color, BlendMode mode);
20
21 static ScopedObject<ColorFilter> MakeMatrix(const float matrix[20]);
22
23 explicit ColorFilter(std::shared_ptr<const flutter::DlColorFilter> filter);
24
25 ~ColorFilter() override;
26
27 ColorFilter(const ColorFilter&) = delete;
28
29 ColorFilter& operator=(const ColorFilter&) = delete;
30
31 const std::shared_ptr<const flutter::DlColorFilter>& GetColorFilter() const;
32
33 private:
34 std::shared_ptr<const flutter::DlColorFilter> filter_;
35 };
36
37 } // namespace impeller::interop
38
39 #endif // FLUTTER_IMPELLER_TOOLKIT_INTEROP_COLOR_FILTER_H_
impeller::interop::ColorFilter
Definition: color_filter.h:17
impeller::interop::ColorFilter::~ColorFilter
~ColorFilter() override
impeller::interop::ColorFilter::GetColorFilter
const std::shared_ptr< const flutter::DlColorFilter > & GetColorFilter() const
Definition: color_filter.cc:32
impeller::interop::ColorFilter::operator=
ColorFilter & operator=(const ColorFilter &)=delete
impeller::interop::ColorFilter::ColorFilter
ColorFilter(std::shared_ptr< const flutter::DlColorFilter > filter)
Definition: color_filter.cc:26
impeller::interop::ColorFilter::MakeMatrix
static ScopedObject< ColorFilter > MakeMatrix(const float matrix[20])
Definition: color_filter.cc:18
impeller::interop::ColorFilter::ColorFilter
ColorFilter(const ColorFilter &)=delete
impeller::interop::ColorFilter::MakeBlend
static ScopedObject< ColorFilter > MakeBlend(Color color, BlendMode mode)
Definition: color_filter.cc:9
impeller::interop::Object
Definition: object.h:56
impeller::interop::ScopedObject
Definition: object.h:67
impeller.h
impeller::interop
Definition: color_filter.cc:7
impeller::BlendMode
BlendMode
Definition: color.h:58
object.h
impeller::Color
Definition: color.h:123
formats.h