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_HOLE_LAYER_H_ 6 #define FLUTTER_FLOW_LAYERS_HOLE_LAYER_H_ 7 8 #include "flutter/flow/layers/container_layer.h" 9 #include "include/core/SkRect.h" 10 11 namespace flutter { 12 13 class HoleLayer : public ContainerLayer { 14 public: 15 16 HoleLayer(const SkRect& rect, int hole_id); 17 ~HoleLayer() override; 18 19 void Preroll(PrerollContext* frame, const SkMatrix& matrix) override; 20 void Paint(PaintContext& context) const override; 21 void MarkHole(); 22 23 private: 24 SkRect rect_; 25 int hole_id_; 26 27 FML_DISALLOW_COPY_AND_ASSIGN(HoleLayer); 28 }; 29 30 } // namespace flutter 31 32 #endif // FLUTTER_FLOW_LAYERS_HOLE_LAYER_H_ 33