Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
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
1 change: 1 addition & 0 deletions impeller/aiks/experimental_canvas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ void ExperimentalCanvas::DrawTextFrame(
text_contents->SetForceTextColor(paint.mask_blur_descriptor.has_value());
text_contents->SetScale(GetCurrentTransform().GetMaxBasisLengthXY());
text_contents->SetColor(paint.color);
text_contents->SetOffset(position);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks necessary. I'm confused as to why this version has a call to SetScale while the regular canvas version does not. Is that another issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the regular canvas, we populate the scale when populating the glyph atlas:

https://github.com/flutter/engine/blob/main/impeller/entity/contents/text_contents.cc#L66-L71

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, and for the experimental canvas that is done before the TextContents exists. I see...

text_contents->SetTextProperties(paint.color, //
paint.style == Paint::Style::kStroke, //
paint.stroke_width, //
Expand Down