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_PLATFORM_VIEW_LAYER_H_ |
6 | #define FLUTTER_FLOW_LAYERS_PLATFORM_VIEW_LAYER_H_ |
7 | |
8 | #include "flutter/flow/layers/layer.h" |
9 | #include "third_party/skia/include/core/SkPoint.h" |
10 | #include "third_party/skia/include/core/SkSize.h" |
11 | |
12 | namespace flutter { |
13 | |
14 | class PlatformViewLayer : public Layer { |
15 | public: |
16 | PlatformViewLayer(const SkPoint& offset, const SkSize& size, int64_t view_id); |
17 | |
18 | void Preroll(PrerollContext* context, const SkMatrix& matrix) override; |
19 | void Paint(PaintContext& context) const override; |
20 | #if defined(LEGACY_FUCHSIA_EMBEDDER) |
21 | // Updates the system composited scene. |
22 | void UpdateScene(SceneUpdateContext& context) override; |
23 | #endif |
24 | |
25 | private: |
26 | SkPoint offset_; |
27 | SkSize size_; |
28 | int64_t view_id_; |
29 | |
30 | FML_DISALLOW_COPY_AND_ASSIGN(PlatformViewLayer); |
31 | }; |
32 | |
33 | } // namespace flutter |
34 | |
35 | #endif // FLUTTER_FLOW_LAYERS_PLATFORM_VIEW_LAYER_H_ |
36 |