Remove opacity layer dcheck. (flutter/engine#46160)
In https://github.com/flutter/flutter/issues/132849 it was found that rendering happens fine when this dcheck is removed. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
@@ -36,8 +36,6 @@ void OpacityLayer::Diff(DiffContext* context, const Layer* old_layer) {
|
||||
}
|
||||
|
||||
void OpacityLayer::Preroll(PrerollContext* context) {
|
||||
FML_DCHECK(!layers().empty()); // We can't be a leaf.
|
||||
|
||||
auto mutator = context->state_stack.save();
|
||||
mutator.translate(offset_);
|
||||
mutator.applyOpacity(SkRect(), DlColor::toOpacity(alpha_));
|
||||
|
||||
@@ -27,14 +27,6 @@ namespace testing {
|
||||
using OpacityLayerTest = LayerTest;
|
||||
|
||||
#ifndef NDEBUG
|
||||
TEST_F(OpacityLayerTest, LeafLayer) {
|
||||
auto layer =
|
||||
std::make_shared<OpacityLayer>(SK_AlphaOPAQUE, SkPoint::Make(0.0f, 0.0f));
|
||||
|
||||
EXPECT_DEATH_IF_SUPPORTED(layer->Preroll(preroll_context()),
|
||||
"\\!layers\\(\\)\\.empty\\(\\)");
|
||||
}
|
||||
|
||||
TEST_F(OpacityLayerTest, PaintingEmptyLayerDies) {
|
||||
auto mock_layer = std::make_shared<MockLayer>(SkPath());
|
||||
auto layer =
|
||||
|
||||
Reference in New Issue
Block a user