未验证 提交 4812a2af 编写于 作者: L liyuqian 提交者: GitHub

DCHECK that clip layer's behavior isn't none (#7659)

This will further guard that the framework won't forget to set the
clip behavior.

This has been tested with the flutter/flutter framework
`flutter test --local-engine=host_debug_unopt`
to ensure a successful engine roll.
上级 eaae8a67
......@@ -13,7 +13,9 @@
namespace flow {
ClipPathLayer::ClipPathLayer(Clip clip_behavior)
: clip_behavior_(clip_behavior) {}
: clip_behavior_(clip_behavior) {
FML_DCHECK(clip_behavior != Clip::none);
}
ClipPathLayer::~ClipPathLayer() = default;
......
......@@ -7,7 +7,9 @@
namespace flow {
ClipRectLayer::ClipRectLayer(Clip clip_behavior)
: clip_behavior_(clip_behavior) {}
: clip_behavior_(clip_behavior) {
FML_DCHECK(clip_behavior != Clip::none);
}
ClipRectLayer::~ClipRectLayer() = default;
......
......@@ -7,7 +7,9 @@
namespace flow {
ClipRRectLayer::ClipRRectLayer(Clip clip_behavior)
: clip_behavior_(clip_behavior) {}
: clip_behavior_(clip_behavior) {
FML_DCHECK(clip_behavior != Clip::none);
}
ClipRRectLayer::~ClipRRectLayer() = default;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册