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
5
#include "
flutter/flow/layers/clip_rrect_layer.h
"
6
7
namespace
flutter
{
8
9
ClipRRectLayer::ClipRRectLayer
(
const
DlRoundRect
& clip_rrect,
10
Clip
clip_behavior)
11
:
ClipShapeLayer
(clip_rrect, clip_behavior) {}
12
13
const
DlRect
ClipRRectLayer::clip_shape_bounds
()
const
{
14
return
clip_shape
().
GetBounds
();
15
}
16
17
void
ClipRRectLayer::ApplyClip
(
LayerStateStack::MutatorContext
& mutator)
const
{
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
flutter::ClipRRectLayer::clip_shape_bounds
const DlRect clip_shape_bounds() const override
Definition
clip_rrect_layer.cc:13
flutter::ClipRRectLayer::ClipRRectLayer
ClipRRectLayer(const DlRoundRect &clip_rrect, Clip clip_behavior)
Definition
clip_rrect_layer.cc:9
flutter::ClipRRectLayer::ApplyClip
void ApplyClip(LayerStateStack::MutatorContext &mutator) const override
Definition
clip_rrect_layer.cc:17
flutter::ClipShapeLayer
Definition
clip_shape_layer.h:15
flutter::ClipShapeLayer< DlRoundRect >::clip_behavior
Clip clip_behavior() const
Definition
clip_shape_layer.h:113
flutter::ClipShapeLayer< DlRoundRect >::clip_shape
const ClipShape & clip_shape() const
Definition
clip_shape_layer.h:112
flutter::LayerStateStack::MutatorContext
Definition
layer_state_stack.h:156
flutter::LayerStateStack::MutatorContext::clipRRect
void clipRRect(const DlRoundRect &rrect, bool is_aa)
Definition
layer_state_stack.cc:600
flutter::LayerStateStack::MutatorContext::clipRect
void clipRect(const DlRect &rect, bool is_aa)
Definition
layer_state_stack.cc:594
clip_rrect_layer.h
flutter
Definition
asset_manager.cc:10
flutter::Clip
Clip
Definition
layer.h:43
flutter::kHardEdge
@ kHardEdge
Definition
layer.h:43
impeller::RoundRect
Definition
round_rect.h:16
impeller::RoundRect::GetBounds
constexpr const Rect & GetBounds() const
Definition
round_rect.h:53
impeller::TRect< Scalar >
flow
layers
clip_rrect_layer.cc
Generated on Thu Nov 6 2025 16:11:21 for Flutter Engine by
1.9.8