Flutter Engine
child_scene_layer.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_FLOW_LAYERS_CHILD_SCENE_LAYER_H_
6 #define FLUTTER_FLOW_LAYERS_CHILD_SCENE_LAYER_H_
7 
8 #include "flutter/flow/layers/layer.h"
9 #include "flutter/flow/scene_update_context.h"
10 #include "third_party/skia/include/core/SkMatrix.h"
11 #include "third_party/skia/include/core/SkPoint.h"
12 #include "third_party/skia/include/core/SkSize.h"
13 
14 namespace flutter {
15 
16 // Layer that represents an embedded child.
17 class ChildSceneLayer : public Layer {
18  public:
19  ChildSceneLayer(zx_koid_t layer_id,
20  const SkPoint& offset,
21  const SkSize& size,
22  bool hit_testable);
23  ~ChildSceneLayer() override = default;
24 
25  void Preroll(PrerollContext* context, const SkMatrix& matrix) override;
26 
27  void Paint(PaintContext& context) const override;
28 
29  void UpdateScene(std::shared_ptr<SceneUpdateContext> context) override;
30 
31  private:
32  zx_koid_t layer_id_ = ZX_KOID_INVALID;
33  SkPoint offset_;
34  SkSize size_;
35  bool hit_testable_ = true;
36 
37  FML_DISALLOW_COPY_AND_ASSIGN(ChildSceneLayer);
38 };
39 
40 } // namespace flutter
41 
42 #endif // FLUTTER_FLOW_LAYERS_CHILD_SCENE_LAYER_H_
void Paint(PaintContext &context) const override
void Preroll(PrerollContext *context, const SkMatrix &matrix) override
ChildSceneLayer(zx_koid_t layer_id, const SkPoint &offset, const SkSize &size, bool hit_testable)
constexpr std::size_t size(T(&array)[N])
Definition: size.h:13
~ChildSceneLayer() override=default
void UpdateScene(std::shared_ptr< SceneUpdateContext > context) override