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] Pack impeller:Path into 2 vecs instead of 3. #55028

Merged
merged 16 commits into from
Sep 24, 2024

Conversation

jonahwilliams
Copy link
Member

@jonahwilliams jonahwilliams commented Sep 7, 2024

This better aligns impeller::Path with how Skia::Path works, and probably gives us a route to a faster Skia path to Impeller::Path conversion (since dart:ui Path will be a Skia path for a long time).

We used 3 vectors to separately store:

  1. Path points
  2. Path Verbs
  3. Path contours (index lookups for contour starts).

This gave us almost O(1) access for path points based on the verb. However, we don't ever actually use the lookup except for in tests. In all real scenarios we iterate through all path verbs, which means this iterators can simply increment the offset into the path points array. Finally, we can store the contour information in the path points array as well by representing the bool is_closed with another Point value :) (for easier alignment).

@jonahwilliams jonahwilliams changed the title [Impeller] use 2 vecs instead of 3. [Impeller] Pack impeller:Path into 2 vecs instead of 3. Sep 7, 2024
@@ -7,6 +7,7 @@

#include <memory>
#include <optional>
#include <variant>
Copy link
Member Author

Choose a reason for hiding this comment

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

This include was being pulled in transitively via impeller::Path

@@ -138,14 +153,6 @@ class Path {

bool IsEmpty() const;

template <class T>
Copy link
Member Author

Choose a reason for hiding this comment

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

This was only used in a single test so I removed it.

@jonahwilliams jonahwilliams marked this pull request as ready for review September 9, 2024 16:24
@flutter-dashboard
Copy link

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.

Changes reported for pull request #55028 at sha 8630224

@jonahwilliams
Copy link
Member Author

Still some kinks to work out of this one according to the tests.

@jonahwilliams jonahwilliams marked this pull request as draft September 9, 2024 23:51
@flutter-dashboard
Copy link

This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again.

@jonahwilliams jonahwilliams marked this pull request as ready for review September 10, 2024 04:08
@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

Changes reported for pull request #55028 at sha 85dbffc

@jonahwilliams jonahwilliams marked this pull request as draft September 10, 2024 06:51
@jonahwilliams jonahwilliams marked this pull request as ready for review September 12, 2024 03:42
@jonahwilliams jonahwilliams marked this pull request as draft September 12, 2024 06:18
@jonahwilliams jonahwilliams marked this pull request as ready for review September 12, 2024 17:13
@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

Changes reported for pull request #55028 at sha 8accf3e

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 23, 2024
Copy link
Contributor

auto-submit bot commented Sep 23, 2024

auto label is removed for flutter/engine/55028, due to - The status or check suite Linux linux_host_engine has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 23, 2024
@jonahwilliams jonahwilliams added autosubmit Merge PR when tree becomes green via auto submit App and removed will affect goldens labels Sep 24, 2024
@auto-submit auto-submit bot merged commit 0ce0d22 into flutter:main Sep 24, 2024
30 checks passed
@jonahwilliams jonahwilliams deleted the align_path branch September 24, 2024 23:05
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 25, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Sep 25, 2024
…155648)

flutter/engine@559f2ff...746ce61

2024-09-25 skia-flutter-autoroll@skia.org Roll Dart SDK from 7af8c4882e07 to eda9ae15367e (2 revisions) (flutter/engine#55417)
2024-09-25 bdero@google.com [Flutter GPU] Add CullMode. (flutter/engine#55409)
2024-09-25 skia-flutter-autoroll@skia.org Roll Skia from 2e92f0b443f4 to 3541cdf2fae6 (1 revision) (flutter/engine#55412)
2024-09-24 jonahwilliams@google.com [Impeller] fix Impeller on windows. (flutter/engine#55323)
2024-09-24 jonahwilliams@google.com [Impeller] add basic culling checks during text frame dispatcher. (flutter/engine#55168)
2024-09-24 matanlurey@users.noreply.github.com Move each dart GN rule to a standalone file. (flutter/engine#55404)
2024-09-24 skia-flutter-autoroll@skia.org Roll Skia from 118914b760cb to 2e92f0b443f4 (1 revision) (flutter/engine#55406)
2024-09-24 jonahwilliams@google.com [Impeller] Pack impeller:Path into 2 vecs instead of 3. (flutter/engine#55028)
2024-09-24 codefu@google.com Disallow time traveling frame times (flutter/engine#55310)
2024-09-24 jason-simmons@users.noreply.github.com [Impeller] Delete command pools held by the CommandPoolRecyclerVK after decoding an image on the IO thread (flutter/engine#55398)
2024-09-24 skia-flutter-autoroll@skia.org Roll Skia from cf28f9dd411d to 118914b760cb (1 revision) (flutter/engine#55405)
2024-09-24 bdero@google.com [Flutter GPU] Add pipeline stencil config. (flutter/engine#55272)
2024-09-24 skia-flutter-autoroll@skia.org Roll Skia from 6e5ff9253147 to cf28f9dd411d (1 revision) (flutter/engine#55399)
2024-09-24 jonahwilliams@google.com [Impeller] delete expensive trace event. (flutter/engine#55400)

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 bdero@google.com,rmistry@google.com,zra@google.com 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
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 26, 2024
…lutter#155648)

flutter/engine@559f2ff...746ce61

2024-09-25 skia-flutter-autoroll@skia.org Roll Dart SDK from 7af8c4882e07 to eda9ae15367e (2 revisions) (flutter/engine#55417)
2024-09-25 bdero@google.com [Flutter GPU] Add CullMode. (flutter/engine#55409)
2024-09-25 skia-flutter-autoroll@skia.org Roll Skia from 2e92f0b443f4 to 3541cdf2fae6 (1 revision) (flutter/engine#55412)
2024-09-24 jonahwilliams@google.com [Impeller] fix Impeller on windows. (flutter/engine#55323)
2024-09-24 jonahwilliams@google.com [Impeller] add basic culling checks during text frame dispatcher. (flutter/engine#55168)
2024-09-24 matanlurey@users.noreply.github.com Move each dart GN rule to a standalone file. (flutter/engine#55404)
2024-09-24 skia-flutter-autoroll@skia.org Roll Skia from 118914b760cb to 2e92f0b443f4 (1 revision) (flutter/engine#55406)
2024-09-24 jonahwilliams@google.com [Impeller] Pack impeller:Path into 2 vecs instead of 3. (flutter/engine#55028)
2024-09-24 codefu@google.com Disallow time traveling frame times (flutter/engine#55310)
2024-09-24 jason-simmons@users.noreply.github.com [Impeller] Delete command pools held by the CommandPoolRecyclerVK after decoding an image on the IO thread (flutter/engine#55398)
2024-09-24 skia-flutter-autoroll@skia.org Roll Skia from cf28f9dd411d to 118914b760cb (1 revision) (flutter/engine#55405)
2024-09-24 bdero@google.com [Flutter GPU] Add pipeline stencil config. (flutter/engine#55272)
2024-09-24 skia-flutter-autoroll@skia.org Roll Skia from 6e5ff9253147 to cf28f9dd411d (1 revision) (flutter/engine#55399)
2024-09-24 jonahwilliams@google.com [Impeller] delete expensive trace event. (flutter/engine#55400)

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 bdero@google.com,rmistry@google.com,zra@google.com 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
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 26, 2024
…lutter#155648)

flutter/engine@559f2ff...746ce61

2024-09-25 skia-flutter-autoroll@skia.org Roll Dart SDK from 7af8c4882e07 to eda9ae15367e (2 revisions) (flutter/engine#55417)
2024-09-25 bdero@google.com [Flutter GPU] Add CullMode. (flutter/engine#55409)
2024-09-25 skia-flutter-autoroll@skia.org Roll Skia from 2e92f0b443f4 to 3541cdf2fae6 (1 revision) (flutter/engine#55412)
2024-09-24 jonahwilliams@google.com [Impeller] fix Impeller on windows. (flutter/engine#55323)
2024-09-24 jonahwilliams@google.com [Impeller] add basic culling checks during text frame dispatcher. (flutter/engine#55168)
2024-09-24 matanlurey@users.noreply.github.com Move each dart GN rule to a standalone file. (flutter/engine#55404)
2024-09-24 skia-flutter-autoroll@skia.org Roll Skia from 118914b760cb to 2e92f0b443f4 (1 revision) (flutter/engine#55406)
2024-09-24 jonahwilliams@google.com [Impeller] Pack impeller:Path into 2 vecs instead of 3. (flutter/engine#55028)
2024-09-24 codefu@google.com Disallow time traveling frame times (flutter/engine#55310)
2024-09-24 jason-simmons@users.noreply.github.com [Impeller] Delete command pools held by the CommandPoolRecyclerVK after decoding an image on the IO thread (flutter/engine#55398)
2024-09-24 skia-flutter-autoroll@skia.org Roll Skia from cf28f9dd411d to 118914b760cb (1 revision) (flutter/engine#55405)
2024-09-24 bdero@google.com [Flutter GPU] Add pipeline stencil config. (flutter/engine#55272)
2024-09-24 skia-flutter-autoroll@skia.org Roll Skia from 6e5ff9253147 to cf28f9dd411d (1 revision) (flutter/engine#55399)
2024-09-24 jonahwilliams@google.com [Impeller] delete expensive trace event. (flutter/engine#55400)

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 bdero@google.com,rmistry@google.com,zra@google.com 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
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 27, 2024
…lutter#155648)

flutter/engine@559f2ff...746ce61

2024-09-25 skia-flutter-autoroll@skia.org Roll Dart SDK from 7af8c4882e07 to eda9ae15367e (2 revisions) (flutter/engine#55417)
2024-09-25 bdero@google.com [Flutter GPU] Add CullMode. (flutter/engine#55409)
2024-09-25 skia-flutter-autoroll@skia.org Roll Skia from 2e92f0b443f4 to 3541cdf2fae6 (1 revision) (flutter/engine#55412)
2024-09-24 jonahwilliams@google.com [Impeller] fix Impeller on windows. (flutter/engine#55323)
2024-09-24 jonahwilliams@google.com [Impeller] add basic culling checks during text frame dispatcher. (flutter/engine#55168)
2024-09-24 matanlurey@users.noreply.github.com Move each dart GN rule to a standalone file. (flutter/engine#55404)
2024-09-24 skia-flutter-autoroll@skia.org Roll Skia from 118914b760cb to 2e92f0b443f4 (1 revision) (flutter/engine#55406)
2024-09-24 jonahwilliams@google.com [Impeller] Pack impeller:Path into 2 vecs instead of 3. (flutter/engine#55028)
2024-09-24 codefu@google.com Disallow time traveling frame times (flutter/engine#55310)
2024-09-24 jason-simmons@users.noreply.github.com [Impeller] Delete command pools held by the CommandPoolRecyclerVK after decoding an image on the IO thread (flutter/engine#55398)
2024-09-24 skia-flutter-autoroll@skia.org Roll Skia from cf28f9dd411d to 118914b760cb (1 revision) (flutter/engine#55405)
2024-09-24 bdero@google.com [Flutter GPU] Add pipeline stencil config. (flutter/engine#55272)
2024-09-24 skia-flutter-autoroll@skia.org Roll Skia from 6e5ff9253147 to cf28f9dd411d (1 revision) (flutter/engine#55399)
2024-09-24 jonahwilliams@google.com [Impeller] delete expensive trace event. (flutter/engine#55400)

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 bdero@google.com,rmistry@google.com,zra@google.com 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
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 27, 2024
…lutter#155648)

flutter/engine@559f2ff...746ce61

2024-09-25 skia-flutter-autoroll@skia.org Roll Dart SDK from 7af8c4882e07 to eda9ae15367e (2 revisions) (flutter/engine#55417)
2024-09-25 bdero@google.com [Flutter GPU] Add CullMode. (flutter/engine#55409)
2024-09-25 skia-flutter-autoroll@skia.org Roll Skia from 2e92f0b443f4 to 3541cdf2fae6 (1 revision) (flutter/engine#55412)
2024-09-24 jonahwilliams@google.com [Impeller] fix Impeller on windows. (flutter/engine#55323)
2024-09-24 jonahwilliams@google.com [Impeller] add basic culling checks during text frame dispatcher. (flutter/engine#55168)
2024-09-24 matanlurey@users.noreply.github.com Move each dart GN rule to a standalone file. (flutter/engine#55404)
2024-09-24 skia-flutter-autoroll@skia.org Roll Skia from 118914b760cb to 2e92f0b443f4 (1 revision) (flutter/engine#55406)
2024-09-24 jonahwilliams@google.com [Impeller] Pack impeller:Path into 2 vecs instead of 3. (flutter/engine#55028)
2024-09-24 codefu@google.com Disallow time traveling frame times (flutter/engine#55310)
2024-09-24 jason-simmons@users.noreply.github.com [Impeller] Delete command pools held by the CommandPoolRecyclerVK after decoding an image on the IO thread (flutter/engine#55398)
2024-09-24 skia-flutter-autoroll@skia.org Roll Skia from cf28f9dd411d to 118914b760cb (1 revision) (flutter/engine#55405)
2024-09-24 bdero@google.com [Flutter GPU] Add pipeline stencil config. (flutter/engine#55272)
2024-09-24 skia-flutter-autoroll@skia.org Roll Skia from 6e5ff9253147 to cf28f9dd411d (1 revision) (flutter/engine#55399)
2024-09-24 jonahwilliams@google.com [Impeller] delete expensive trace event. (flutter/engine#55400)

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 bdero@google.com,rmistry@google.com,zra@google.com 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants