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_FLOW_LAYERS_COLOR_FILTER_LAYER_H_ |
6 | #define FLUTTER_FLOW_LAYERS_COLOR_FILTER_LAYER_H_ |
7 | |
8 | #include "flutter/flow/layers/container_layer.h" |
9 | |
10 | #include "third_party/skia/include/core/SkColorFilter.h" |
11 | |
12 | namespace flutter { |
13 | |
14 | class ColorFilterLayer : public ContainerLayer { |
15 | public: |
16 | ColorFilterLayer(sk_sp<SkColorFilter> filter); |
17 | |
18 | void Preroll(PrerollContext* context, const SkMatrix& matrix) override; |
19 | |
20 | void Paint(PaintContext& context) const override; |
21 | |
22 | private: |
23 | sk_sp<SkColorFilter> filter_; |
24 | |
25 | FML_DISALLOW_COPY_AND_ASSIGN(ColorFilterLayer); |
26 | }; |
27 | |
28 | } // namespace flutter |
29 | |
30 | #endif // FLUTTER_FLOW_LAYERS_COLOR_FILTER_LAYER_H_ |
31 |