-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[Impeller] Delete redundant impeller path classes #168760
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
Conversation
|
The RoundSuperellipse parts look good to me! Thank you for the cleanup! |
engine/src/flutter/impeller/tessellator/tessellator_unittests.cc
Outdated
Show resolved
Hide resolved
|
Currently I have most of the libtess stuff commented out and some of the other tessellator stuff may also be commented out while I see what the status of the libtess library and Dart file is. I can convert it, but I wanted to make sure libtess was still being used before I did so. |
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
unfortunately the libtess stuff is still used, as that library is compiled to a shared library that is used by package:vector_graphics. but it doesn't need to use the impeller path stuff, it could use Skia path: the binary size isn't important as it is not shipped in applications |
|
There are many cases in the goldens where we rendered a There is also a group of diffs that look like the edge conditions on some of the paths were affected (perhaps due to changes in the way that impeller vs. Skia computes bounds). |
@chinmaygarde suggested that we could remove it from the repo and ship it separately. |
|
Yes, it appears that Skia adds an arc to a path greedily by 90 degree increments until it reaches the last <90 degree tail end - which means that the control points of the conics for those quarter circles will lie outside the "bounds" of the arc if the beginning isn't quadrant aligned. There is a method on SkPath to compute a tight bounds, but I'd like to avoid using that unless necessary. I can either create a custom ArcPathSource which will generate conics that don't have control points outside the bounds and/or which reports its bounds based on the bounds of the ellipse it inscribes and the start/end points themselves. |
|
The vector graphics compiler will handle the library being missing (https://github.com/flutter/packages/blob/14685811ed39d018b763ec45e8d520f6d82f8073/packages/vector_graphics_compiler/lib/src/_initialize_tessellator_io.dart#L11) but the functionality that relies on that library will stop working.
But from where and when? The easiest place to build this is going to be from flutter/flutter. If its not too much trouble, I'd try to adapt the Skia paths to work in the libtess library. otherwise we can remove it, but lets not add it somewhere else - just get rid of it. |
It's not as complicated as using Skia. The files can use the path iteration like the rest of Impeller, I just have to do the plumbing... |
|
libtess is back now |
| namespace flutter { | ||
| namespace testing { | ||
|
|
||
| class DlPathVerbCounter : public DlPathReceiver { |
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.
It occurs to me that I could have added a method to Dlpath for this. Hmm. It's only needed to report metrics for benchmarks though, so ... meh.
|
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
The goldens look as would be expected. This should be ready for review... |
|
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
Nearly all parts of the Impeller rendering pipeline now rely on DlPath and PathSource objects for their path description needs. The impeller path only exists for impeller's unit tests and benchmarks to have a local way to construct paths. We implement path construction for the DlPath object via DlPathBuilder which makes the impeller family of path objects functionally obsolete and so they are now deleted.