DCHECK that clip layer's behavior isn't none (flutter/engine#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.
This commit is contained in:
liyuqian
2019-02-04 13:31:21 -08:00
committed by GitHub
parent 13d75a0e8d
commit b6888b482e
3 changed files with 9 additions and 3 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;