Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Impeller] Migrate unit tests off of Skia geometry classes #161855

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

Merged

Conversation

flar
Copy link
Contributor

@flar flar commented Jan 18, 2025

Handles the impeller unittests line in #161456

This PR is focused on the unit tests in Impeller. There are still some uses in other non-test areas which will be handled in a separate PR.

@github-actions github-actions bot added a: text input Entering text in a text field or keyboard related problems engine flutter/engine repository. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Jan 18, 2025
@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.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #161855 at sha 861f456

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Jan 18, 2025
@flutter-dashboard
Copy link

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

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #161855 at sha 2f32b46

@flar flar force-pushed the impeller-migrate-unittest-geometry-classes branch from fcb35a4 to 3059f2c Compare January 21, 2025 23:53
@flar
Copy link
Contributor Author

flar commented Jan 22, 2025

Note that some of the path construction in a few places will first use a DlPath to make a sub-path and then add that path into the overall path being constructed. The reason for this is that the DlPath factories use Skia to construct the path and Skia uses conics to make circles, arcs, and ovals. As a result, using the Impeller PathBuilder to construct those same elements would use cubic Bezier curves instead and the two do not render precisely the same - causing a couple of rounds of golden test failures. Rather than triage new golden images, I decided to use that roundabout way to construct the paths to avoid any disturbance of the goldens.

Eventually we will take on the task of completing the Impeller PathBuilder and have it support all of the functionality of SkPath (and PathOps?) at which point we can accept the golden test hits, but for now, just to get the golden tests converted to the local geometry classes, we will leverage our compatible factory methods for these operations.

@flar flar requested a review from jonahwilliams January 22, 2025 02:15
@flar
Copy link
Contributor Author

flar commented Jan 22, 2025

I successfully fixed all of the golden differences...

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.

Reading through this reminded me that we have a few missing pieces in the impeller::Path impelementation:

  1. impeller only computes tight bounds, which is much slower than skia's bounds computation.
  2. impeller doesn't have a convexity checker. MIght be worth pulling out Skias

LGTM

@flar flar added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 22, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Jan 22, 2025
Merged via the queue into flutter:master with commit e039219 Jan 22, 2025
181 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 22, 2025
@harryterkelsen harryterkelsen added the revert Autorevert PR (with "Reason for revert:" comment) label Jan 22, 2025
@harryterkelsen
Copy link
Contributor

Reason for revert: causing test failures on linux_unopt shard

https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20Production%20Engine%20Drone/1044163/infra

auto-submit bot pushed a commit that referenced this pull request Jan 23, 2025
@auto-submit auto-submit bot removed the revert Autorevert PR (with "Reason for revert:" comment) label Jan 23, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jan 23, 2025
…161855)" (#162046)

<!-- start_original_pr_link -->
Reverts: #161855
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: harryterkelsen
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: causing test failures on `linux_unopt` shard


https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20Production%20Engine%20Drone/1044163/infra
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: flar
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {jonahwilliams}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
Handles the impeller unittests line in
#161456

This PR is focused on the unit tests in Impeller. There are still some
uses in other non-test areas which will be handled in a separate PR.
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <[email protected]>
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jan 23, 2025
…8482)

Manual roll Flutter from b9e86a565f92 to b2f515f45ef5 (42 revisions)

Manual roll requested by [email protected]

flutter/flutter@b9e86a5...b2f515f

2025-01-22 [email protected] Roll Dart to Version 3.8.0-24.0.dev (flutter/flutter#162035)
2025-01-22 [email protected] `const AnimationStyle` (flutter/flutter#160564)
2025-01-22 [email protected] Add piping and bringup nodes for `_vulkan` and `_opengles` suites. (flutter/flutter#162020)
2025-01-22 [email protected] [Impeller] Migrate unit tests off of Skia geometry classes (flutter/flutter#161855)
2025-01-22 [email protected] Experiment with a `files-changed.json` per PR (flutter/flutter#161788)
2025-01-22 [email protected] Move FlKeyboardManager and FlKeyboardHandler from FlView to FlEngine. (flutter/flutter#161925)
2025-01-22 [email protected] Roll Packages from e8f1f63 to 3d3ab7b (1 revision) (flutter/flutter#162019)
2025-01-22 [email protected] Adds cupertino picker semantics test (flutter/flutter#161768)
2025-01-22 [email protected] [web] Remove deprecated web-only APIs from dart:ui (flutter/flutter#161775)
2025-01-22 [email protected] fix: Add enabled property for search anchor named constructor (flutter/flutter#161468)
2025-01-22 [email protected] Roll pub packages (flutter/flutter#162015)
2025-01-22 [email protected] [web] Remove spam from test output (flutter/flutter#161774)
2025-01-22 [email protected] Match CupertinoPageTransitionsBuilder animation duration to CupertinoPageRoute (2) (flutter/flutter#161577)
2025-01-22 [email protected] Make `font-subset` a standalone `run_tests.py` variant. (flutter/flutter#162016)
2025-01-22 [email protected] Enabled provisioning updates and device registration during building xcarchive. (flutter/flutter#159622)
2025-01-22 [email protected] [web] Remove HTML from bots, test suites and e2e tests (flutter/flutter#161537)
2025-01-22 [email protected] Expand the `.ci.yaml` and `builder.json` linter (flutter/flutter#161991)
2025-01-22 [email protected] Fix incorrect [enabled] documentation (flutter/flutter#161650)
2025-01-22 [email protected] Add `windows_host_engine_test`. (flutter/flutter#161992)
2025-01-22 [email protected] Roll Dart to version Version 3.8.0-19.0.dev (flutter/flutter#161989)
2025-01-22 [email protected] Deprecate `ThemeData.indicatorColor` in favor of `TabBarThemeData.indicatorColor` (flutter/flutter#160024)
2025-01-22 [email protected] [Impeller] disable older xclipse gpu driver. (flutter/flutter#161981)
2025-01-22 [email protected] Merge changelog for 3.27.3 release (flutter/flutter#161977)
2025-01-21 [email protected] Remove FlKeyboardViewDelegate (flutter/flutter#161705)
2025-01-21 [email protected] Fix documentation of Flow.clipBehavior (flutter/flutter#161863)
2025-01-21 [email protected] [impeller] prevent PowerVR from using Vulkan backend. (flutter/flutter#161841)
2025-01-21 [email protected] [Impeller] backfilling TextContents unit tests (flutter/flutter#161625)
2025-01-21 [email protected] Do not handle Dart isolate messages if the isolate is being shut down (flutter/flutter#161824)
2025-01-21 [email protected] fix failing lint : findByPath requires a specific ordering of project evaluation in `aar_init_script.gradle` (flutter/flutter#159301)
2025-01-21 [email protected] Get `et` working for local web engine builds. (flutter/flutter#161825)
2025-01-21 [email protected] Mark Linux_pixel_7pro flavors_test unflaky (flutter/flutter#160994)
2025-01-21 [email protected] Marks Mac_mokey run_debug_test_android to be flaky (flutter/flutter#161656)
2025-01-21 [email protected] Don't crash flutter tool if Chrome is not available (flutter/flutter#154941)
2025-01-21 [email protected] Fix DropdownMenu icon and item icon misalignment (flutter/flutter#161717)
2025-01-21 [email protected] [native assets] Cleanup dead code 2 (flutter/flutter#161916)
2025-01-21 [email protected] Update `ListTile` test to prevent log dump and test error message. (flutter/flutter#161811)
2025-01-21 [email protected] Roll pub packages (flutter/flutter#161924)
2025-01-21 [email protected] Make `PipelineOwner` a `base` class (flutter/flutter#161789)
2025-01-20 [email protected] [native assets] Cleanup dead code (flutter/flutter#161913)
2025-01-20 [email protected] Roll Packages from f73cb00 to e8f1f63 (9 revisions) (flutter/flutter#161914)
2025-01-20 [email protected] [ flutter_tool ] Fix flakiness in doctor_test.dart (flutter/flutter#161917)
2025-01-19 [email protected] Update documentation on what display information is provided. (flutter/flutter#161785)

If this roll has caused a breakage, revert this CL and stop the roller
...
github-merge-queue bot pushed a commit that referenced this pull request Jan 24, 2025
…161855)" (#162146)

Reverts #162046

The root cause of the test failures seen in the original PR have been
fixed.
Wasmund1 pushed a commit to Wasmund1/flutter that referenced this pull request Jan 24, 2025
…61855)

Handles the impeller unittests line in
flutter#161456

This PR is focused on the unit tests in Impeller. There are still some
uses in other non-test areas which will be handled in a separate PR.
Wasmund1 pushed a commit to Wasmund1/flutter that referenced this pull request Jan 24, 2025
…lutter#161855)" (flutter#162046)

<!-- start_original_pr_link -->
Reverts: flutter#161855
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: harryterkelsen
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: causing test failures on `linux_unopt` shard


https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20Production%20Engine%20Drone/1044163/infra
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: flar
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {jonahwilliams}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
Handles the impeller unittests line in
flutter#161456

This PR is focused on the unit tests in Impeller. There are still some
uses in other non-test areas which will be handled in a separate PR.
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: text input Entering text in a text field or keyboard related problems e: impeller Impeller rendering backend issues and features requests engine flutter/engine repository. See also e: labels. will affect goldens Changes to golden files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants