-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] combine text shaders. #52392
Conversation
|
Version 1: |
| if (use_alpha_color_channel == 1.0) { | ||
| frag_color = value.aaaa * v_text_color; | ||
|
|
||
| if (frag_info.is_color_glyph == 1.0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at using mix(...) but malioc said it was more expensive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol, that was my go-to trick for reducing branches. Glad to know thats obsolete.
|
|
||
| for (const Point& point : unit_points) { | ||
| vtx.unit_position = point; | ||
| std::memcpy(vtx_contents++, &vtx, sizeof(VS::PerVertexData)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why I wrote this with memcpy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do it when I'm not sure about data alignment. But thats not a concern here.
chinmaygarde
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually don't pay too much attention to uniform computation. Its the register spills.
|
|
||
| for (const Point& point : unit_points) { | ||
| vtx.unit_position = point; | ||
| std::memcpy(vtx_contents++, &vtx, sizeof(VS::PerVertexData)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do it when I'm not sure about data alignment. But thats not a concern here.
…147386) flutter/engine@3768ca0...a09295f 2024-04-25 [email protected] [Impeller] combine text shaders. (flutter/engine#52392) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Combine both text shaders into one. One more down!
flutter/flutter#143540