Flutter Engine
 
Loading...
Searching...
No Matches
clip_rrect_layer.cc
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
6
7namespace flutter {
8
10 Clip clip_behavior)
11 : ClipShapeLayer(clip_rrect, clip_behavior) {}
12
16
18 bool is_aa = clip_behavior() != Clip::kHardEdge;
19 if (clip_shape().IsRect()) {
20 mutator.clipRect(clip_shape().GetBounds(), is_aa);
21 } else {
22 mutator.clipRRect(clip_shape(), is_aa);
23 }
24}
25
26} // namespace flutter
const DlRect clip_shape_bounds() const override
ClipRRectLayer(const DlRoundRect &clip_rrect, Clip clip_behavior)
void ApplyClip(LayerStateStack::MutatorContext &mutator) const override
void clipRRect(const DlRoundRect &rrect, bool is_aa)
void clipRect(const DlRect &rect, bool is_aa)
@ kHardEdge
Definition layer.h:43
constexpr const Rect & GetBounds() const
Definition round_rect.h:53