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_SHADER_MASK_LAYER_H_ 6 #define FLUTTER_FLOW_LAYERS_SHADER_MASK_LAYER_H_ 7 8 #include "flutter/flow/layers/container_layer.h" 9 10 #include "third_party/skia/include/core/SkShader.h" 11 12 namespace flutter { 13 14 class ShaderMaskLayer : public ContainerLayer { 15 public: 16 ShaderMaskLayer(sk_sp<SkShader> shader, 17 const SkRect& mask_rect, 18 SkBlendMode blend_mode); 19 ~ShaderMaskLayer() override; 20 21 void Paint(PaintContext& context) const override; 22 23 private: 24 sk_sp<SkShader> shader_; 25 SkRect mask_rect_; 26 SkBlendMode blend_mode_; 27 28 FML_DISALLOW_COPY_AND_ASSIGN(ShaderMaskLayer); 29 }; 30 31 } // namespace flutter 32 33 #endif // FLUTTER_FLOW_LAYERS_SHADER_MASK_LAYER_H_ 34