fix typo in LayerInfo::has_compatible_op (flutter/engine#40209)
fix typo in LayerInfo::has_compatible_op
This commit is contained in:
@@ -446,7 +446,7 @@ class DisplayListBuilder final : public virtual DlCanvas,
|
|||||||
|
|
||||||
bool has_layer() const { return has_layer_; }
|
bool has_layer() const { return has_layer_; }
|
||||||
bool cannot_inherit_opacity() const { return cannot_inherit_opacity_; }
|
bool cannot_inherit_opacity() const { return cannot_inherit_opacity_; }
|
||||||
bool has_compatible_op() const { return cannot_inherit_opacity_; }
|
bool has_compatible_op() const { return has_compatible_op_; }
|
||||||
|
|
||||||
bool is_group_opacity_compatible() const {
|
bool is_group_opacity_compatible() const {
|
||||||
return !cannot_inherit_opacity_;
|
return !cannot_inherit_opacity_;
|
||||||
|
|||||||
@@ -2403,5 +2403,17 @@ TEST(DisplayList, RTreeRenderCulling) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(DisplayListTest, DrawSaveDrawCannotInheritOpacity) {
|
||||||
|
DisplayListBuilder builder;
|
||||||
|
builder.DrawCircle({10, 10}, 5, DlPaint());
|
||||||
|
builder.Save();
|
||||||
|
builder.ClipRect({0, 0, 20, 20}, DlCanvas::ClipOp::kIntersect, false);
|
||||||
|
builder.DrawRect({5, 5, 15, 15}, DlPaint());
|
||||||
|
builder.Restore();
|
||||||
|
auto display_list = builder.Build();
|
||||||
|
|
||||||
|
ASSERT_FALSE(display_list->can_apply_group_opacity());
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace testing
|
} // namespace testing
|
||||||
} // namespace flutter
|
} // namespace flutter
|
||||||
|
|||||||
Reference in New Issue
Block a user