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:
gaaclarke
2023-09-28 14:16:50 -07:00
committed by GitHub
parent 3e3251147a
commit ffb68709ee
2 changed files with 0 additions and 10 deletions

View File

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

View File

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