mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
fix typo in LayerInfo::has_compatible_op (flutter/engine#40209)
fix typo in LayerInfo::has_compatible_op
This commit is contained in:
parent
9127bd4726
commit
f7e95e3490
@ -446,7 +446,7 @@ class DisplayListBuilder final : public virtual DlCanvas,
|
||||
|
||||
bool has_layer() const { return has_layer_; }
|
||||
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 {
|
||||
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 flutter
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user