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
7 changes: 6 additions & 1 deletion display_list/display_list_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,12 @@ void DisplayListBuilder::drawTextBlob(const sk_sp<SkTextBlob> blob,
SkScalar y) {
Push<DrawTextBlobOp>(0, 1, blob, x, y);
AccumulateOpBounds(blob->bounds().makeOffset(x, y), kDrawTextBlobFlags);
CheckLayerOpacityCompatibility();
// There is no way to query if the glyphs of a text blob overlap and
// there are no current guarantees from either Skia or Impeller that
// they will protect overlapping glyphs from the effects of overdraw
// so we must make the conservative assessment that this DL layer is
// not compatible with group opacity inheritance.
UpdateLayerOpacityCompatibility(false);
}
void DisplayListBuilder::DrawTextBlob(const sk_sp<SkTextBlob>& blob,
SkScalar x,
Expand Down
2 changes: 1 addition & 1 deletion display_list/display_list_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ TEST(DisplayList, SingleOpsMightSupportGroupOpacityWithOrWithoutBlendMode) {
static auto display_list = builder.Build();
RUN_TESTS2(builder.drawDisplayList(display_list);, false);
}
RUN_TESTS(builder.drawTextBlob(TestBlob1, 0, 0););
RUN_TESTS2(builder.drawTextBlob(TestBlob1, 0, 0);, false);
RUN_TESTS2(builder.drawShadow(kTestPath1, SK_ColorBLACK, 1.0, false, 1.0);
, false);

Expand Down