Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions flow/layers/opacity_layer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_));
Expand Down
8 changes: 0 additions & 8 deletions flow/layers/opacity_layer_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down