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.
This commit is contained in:
liyuqian 2019-02-04 13:31:21 -08:00 committed by GitHub
parent eaae8a67bc
commit 4812a2af11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;