Flutter Engine
The Flutter Engine
flow
layers
clip_path_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_path_layer.h"
6
7
namespace
flutter
{
8
9
ClipPathLayer::ClipPathLayer
(
const
SkPath
& clip_path,
Clip
clip_behavior)
10
:
ClipShapeLayer
(clip_path, clip_behavior) {}
11
12
const
SkRect
&
ClipPathLayer::clip_shape_bounds
()
const
{
13
return
clip_shape
().
getBounds
();
14
}
15
16
void
ClipPathLayer::ApplyClip
(
LayerStateStack::MutatorContext
& mutator)
const
{
17
mutator.
clipPath
(
clip_shape
(),
clip_behavior
() !=
Clip::kHardEdge
);
18
}
19
20
}
// namespace flutter
SkPath
Definition:
SkPath.h:59
SkPath::getBounds
const SkRect & getBounds() const
Definition:
SkPath.cpp:430
flutter::ClipPathLayer::ApplyClip
void ApplyClip(LayerStateStack::MutatorContext &mutator) const override
Definition:
clip_path_layer.cc:16
flutter::ClipPathLayer::clip_shape_bounds
const SkRect & clip_shape_bounds() const override
Definition:
clip_path_layer.cc:12
flutter::ClipPathLayer::ClipPathLayer
ClipPathLayer(const SkPath &clip_path, Clip clip_behavior=Clip::kAntiAlias)
Definition:
clip_path_layer.cc:9
flutter::ClipShapeLayer
Definition:
clip_shape_layer.h:15
flutter::ClipShapeLayer< SkPath >::clip_behavior
Clip clip_behavior() const
Definition:
clip_shape_layer.h:116
flutter::ClipShapeLayer< SkPath >::clip_shape
const ClipShape & clip_shape() const
Definition:
clip_shape_layer.h:115
flutter::LayerStateStack::MutatorContext
Definition:
layer_state_stack.h:156
flutter::LayerStateStack::MutatorContext::clipPath
void clipPath(const SkPath &path, bool is_aa)
Definition:
layer_state_stack.cc:611
flutter
Definition:
asset_manager.cc:10
flutter::Clip
Clip
Definition:
layer.h:53
flutter::kHardEdge
@ kHardEdge
Definition:
layer.h:53
SkRect
Definition:
extension.cpp:13
Generated on Sun Jun 23 2024 21:54:56 for Flutter Engine by
1.9.4