Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] move draw vertices to dl unittests. #53400

Merged
merged 8 commits into from
Jun 17, 2024

Conversation

jonahwilliams
Copy link
Member

Part of flutter/flutter#142054

Moves all of the drawVertices tests for aiks and entities into DL. This might change some of the entity goldens but ... these are easy to eyeball so it should be fine IMO.

@jonahwilliams jonahwilliams requested a review from gaaclarke June 14, 2024 18:50
Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

lgtm! thanks for migrating more playground tests to golden tests

@@ -185,6 +185,9 @@ impeller_Play_AiksTest_BlurHasNoEdge_Vulkan.png
impeller_Play_AiksTest_BlurredRectangleWithShader_Metal.png
impeller_Play_AiksTest_BlurredRectangleWithShader_OpenGLES.png
impeller_Play_AiksTest_BlurredRectangleWithShader_Vulkan.png
impeller_Play_AiksTest_CanConvertTriangleFanToTriangles_Metal.png
Copy link
Member

Choose a reason for hiding this comment

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

Ah, these are being moved from non-golden tests to golden tests? Excellent.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup!

std::vector<uint16_t> indices,
std::vector<SkPoint> texture_coordinates,
std::vector<DlColor> colors) {
// DlVertexMode mode, int vertex_count, Flags flags, int index_count
Copy link
Member

Choose a reason for hiding this comment

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

Stray comment?


// Draw a hexagon using triangle fan
TEST_P(AiksTest, CanConvertTriangleFanToTriangles) {
constexpr Scalar hexagon_radius = 125;
Copy link
Member

Choose a reason for hiding this comment

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

No action required: What is the radius of a hexagon? The distance between corners and the center? Must be since there is a different center_to_flat which is probable the distance to the midpoint between corners.

@gaaclarke
Copy link
Member

There are a few goldens that look off though, heads up:

Screenshot 2024-06-14 at 1 27 59 PM

@jonahwilliams
Copy link
Member Author

I wonder if something is screwed up with the alpha. testing...

@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 #53400 at sha 6c226a6

@jonahwilliams
Copy link
Member Author

new results appear to be correct, we do the premultiplication before creating the vertices geometry - so the old color values were invalid:

https://github.com/flutter/engine/blob/main/impeller/display_list/dl_vertices_geometry.cc#L45-L52

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 17, 2024
@jonahwilliams
Copy link
Member Author

TLDR, premultiplication happens in DL -> impeller conversion. For the old test I should have premultiplied the colors myself, but I forgot to.

@auto-submit auto-submit bot merged commit 9407053 into flutter:main Jun 17, 2024
34 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 17, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 18, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 18, 2024
…150399)

flutter/engine@a4f266f...1c4e5e2

2024-06-17 [email protected] [DisplayList] Create DrawDashedLine for paragraph code (flutter/engine#53411)
2024-06-17 [email protected] [Impeller] Update Android CPU profiling instructions. (flutter/engine#53437)
2024-06-17 [email protected] [Impeller] move draw vertices to dl unittests. (flutter/engine#53400)
2024-06-17 [email protected] [Impeller] Link CPU profiling docs from the main README. (flutter/engine#53435)
2024-06-17 [email protected] Roll Dart SDK from 1ce6b4d54247 to 51bbba0da7d3 (1 revision) (flutter/engine#53432)
2024-06-17 [email protected] [Impeller] Move drawAtlas golden tests to display list. (flutter/engine#53398)
2024-06-17 [email protected] [flatland] Handle fence overflow in flatland_connection.cc (flutter/engine#53366)
2024-06-17 [email protected] Roll Skia from 0dda1054f543 to 2b9bc16df969 (1 revision) (flutter/engine#53431)

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller will affect goldens
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants