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_TEXTURE_LAYER_H_ |
6 | #define FLUTTER_FLOW_LAYERS_TEXTURE_LAYER_H_ |
7 | |
8 | #include "flutter/flow/layers/layer.h" |
9 | #include "third_party/skia/include/core/SkFilterQuality.h" |
10 | #include "third_party/skia/include/core/SkPoint.h" |
11 | #include "third_party/skia/include/core/SkSize.h" |
12 | |
13 | namespace flutter { |
14 | |
15 | class TextureLayer : public Layer { |
16 | public: |
17 | TextureLayer(const SkPoint& offset, |
18 | const SkSize& size, |
19 | int64_t texture_id, |
20 | bool freeze, |
21 | SkFilterQuality filter_quality); |
22 | |
23 | void Preroll(PrerollContext* context, const SkMatrix& matrix) override; |
24 | void Paint(PaintContext& context) const override; |
25 | |
26 | private: |
27 | SkPoint offset_; |
28 | SkSize size_; |
29 | int64_t texture_id_; |
30 | bool freeze_; |
31 | SkFilterQuality filter_quality_; |
32 | |
33 | FML_DISALLOW_COPY_AND_ASSIGN(TextureLayer); |
34 | }; |
35 | |
36 | } // namespace flutter |
37 | |
38 | #endif // FLUTTER_FLOW_LAYERS_TEXTURE_LAYER_H_ |
39 |