Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Impeller] Move skia_conversions towards retirement #165408

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

flar
Copy link
Contributor

@flar flar commented Mar 18, 2025

The skia_conversions sources and namespace have been filled with methods that are no longer used now that the DisplayList has its own complete set of APIs and is now mostly obsolete.

@github-actions github-actions bot added engine flutter/engine repository. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Mar 18, 2025
@flar
Copy link
Contributor Author

flar commented Mar 18, 2025

What's left?

  • ToColor - used in a variety of places. (Re)moving this should be combined with fixing up some of our DlColor-v-Color and related discussions.
  • ToSamplerDescriptor - also used in a variety of places. But, could live somewhere less legacy-ish.
  • ToBlendMode - only used in impeller::DlDispatcher, but has unit tests defined here. We should probably combine the 2 data types since they are identical except for naming, and delete it rather than moving it. That will be a fairly large code change to make, but it will be 99.9% just a text substitution with reformatting. For now, I left it here. (See [DisplayList] Use impeller::BlendMode rather than a private DlBlendMode enum #165412)

One thing is for sure - the name skia_conversions itself is now an obsolete legacy.

@@ -34,6 +34,31 @@ using DlRect = flutter::DlRect;
using DlIRect = flutter::DlIRect;
using DlPath = flutter::DlPath;

void Paint::ConvertStops(const flutter::DlGradientColorSourceBase* gradient,
Copy link
Member

Choose a reason for hiding this comment

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

We should really do the stop conversion when we record the gradient instead of on each dispatch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, move this logic into DL? We could do it when the DlObject is created from Flutter since I don't think there is read back of the stops once Flutter makes one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Yeah that SG. We already copy from dart:ui into display list, so the conversion can be done there. Technically this is the same conversion skia does when we dispatch to it, so there should be no change in behavior.

Copy link
Member

@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 Mar 18, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 18, 2025
Copy link
Contributor

auto-submit bot commented Mar 18, 2025

autosubmit label was removed for flutter/flutter/165408, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@flar flar added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 18, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Mar 18, 2025
Merged via the queue into flutter:master with commit e407d87 Mar 18, 2025
172 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e: impeller Impeller rendering backend issues and features requests engine flutter/engine repository. See also e: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants