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