Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@flar
Copy link
Contributor

@flar flar commented Oct 10, 2023

Switch the impeller testing in rendertests to use TextFrame objects rather than TextBlob objects when drawing to an Impeller-managed destination.

Previously the DrawText tests would generate over 200 errors because none of the attribute variants would render anything at all. After this fix the number of failures in the DrawText calls is down to 1 which points out that wrapping a DrawTextFrame call in a nothing saveLayer somehow affects the glyph positioning (in a not very appealing manner).

@jonahwilliams
Copy link
Contributor

Stroked text is supported, however this is implemented by immediately converting the text blob to path data and drawing the paths. Is there a way we could use the existing code in paragraph_skia could be reused for this test? (See https://github.com/flutter/engine/blob/main/third_party/txt/src/skia/paragraph_skia.cc#L209 )

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM (but not to CI)

@flar
Copy link
Contributor Author

flar commented Oct 10, 2023

Stroked text is supported, however this is implemented by immediately converting the text blob to path data and drawing the paths. Is there a way we could use the existing code in paragraph_skia could be reused for this test? (See https://github.com/flutter/engine/blob/main/third_party/txt/src/skia/paragraph_skia.cc#L209 )

That would take a lot of special casing. I'll save that for a future fix.

@flar
Copy link
Contributor Author

flar commented Oct 10, 2023

Stroked text is supported, however this is implemented by immediately converting the text blob to path data and drawing the paths. Is there a way we could use the existing code in paragraph_skia could be reused for this test? (See https://github.com/flutter/engine/blob/main/third_party/txt/src/skia/paragraph_skia.cc#L209 )

That would take a lot of special casing. I'll save that for a future fix.

Hmm, so we don't even get a TextFrame in that case so it should be covered by DrawPath tests. I can skip the Impeller tests if the stroking is set up.

(Also, technically the test in the paragraph code should be != Fill...)

@flar
Copy link
Contributor Author

flar commented Oct 10, 2023

I've added some tests that exempt non-color and stroked text from the Impeller testing. Re-requesting a review...

@flar flar requested a review from jonahwilliams October 10, 2023 04:11
return os << "&SkTextBlob(ID: " << blob->uniqueID() << ", " << blob->bounds() << ")";
}

static std::ostream& operator<<(std::ostream& os,
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be a utility in text_frame.cc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TextFrame might want to have a more fully featured streamer. This one just needs enough to hold it's place in the debugging output. The Text objects and Path just dump out some useful info here like bounds.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@flar flar added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 10, 2023
@auto-submit auto-submit bot merged commit e065398 into flutter:main Oct 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 10, 2023
harryterkelsen pushed a commit that referenced this pull request Oct 23, 2023
Switch the impeller testing in rendertests to use TextFrame objects rather than TextBlob objects when drawing to an Impeller-managed destination.

Previously the DrawText tests would generate over 200 errors because none of the attribute variants would render anything at all. After this fix the number of failures in the DrawText calls is down to 1 which points out that wrapping a DrawTextFrame call in a nothing saveLayer somehow affects the glyph positioning (in a not very appealing manner).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Projects

Status: Done
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants