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_CLIP_RRECT_LAYER_H_ 6 #define FLUTTER_FLOW_LAYERS_CLIP_RRECT_LAYER_H_ 7 8 #include "flutter/flow/layers/container_layer.h" 9 10 namespace flutter { 11 12 class ClipRRectLayer : public ContainerLayer { 13 public: 14 ClipRRectLayer(const SkRRect& clip_rrect, Clip clip_behavior); 15 ~ClipRRectLayer() override; 16 17 void Preroll(PrerollContext* context, const SkMatrix& matrix) override; 18 19 void Paint(PaintContext& context) const override; 20 21 #if defined(OS_FUCHSIA) 22 void UpdateScene(SceneUpdateContext& context) override; 23 #endif // defined(OS_FUCHSIA) 24 25 SkRect MapRect(const SkRect& rect) override; 26 27 private: 28 SkRRect clip_rrect_; 29 Clip clip_behavior_; 30 31 FML_DISALLOW_COPY_AND_ASSIGN(ClipRRectLayer); 32 }; 33 34 } // namespace flutter 35 36 #endif // FLUTTER_FLOW_LAYERS_CLIP_RRECT_LAYER_H_ 37