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 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.

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 flar@google.com [DisplayList] Create DrawDashedLine for paragraph code (flutter/engine#53411)
2024-06-17 chinmaygarde@google.com [Impeller] Update Android CPU profiling instructions. (flutter/engine#53437)
2024-06-17 jonahwilliams@google.com [Impeller] move draw vertices to dl unittests. (flutter/engine#53400)
2024-06-17 chinmaygarde@google.com [Impeller] Link CPU profiling docs from the main README. (flutter/engine#53435)
2024-06-17 skia-flutter-autoroll@skia.org Roll Dart SDK from 1ce6b4d54247 to 51bbba0da7d3 (1 revision) (flutter/engine#53432)
2024-06-17 jonahwilliams@google.com [Impeller] Move drawAtlas golden tests to display list. (flutter/engine#53398)
2024-06-17 fmil@google.com [flatland] Handle fence overflow in flatland_connection.cc (flutter/engine#53366)
2024-06-17 skia-flutter-autoroll@skia.org 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 chinmaygarde@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 will affect goldens
Projects
None yet
2 participants