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

Conversation

chunhtai
Copy link
Contributor

@chunhtai chunhtai commented Sep 22, 2023

The golden changes should test the change

fixes flutter/flutter#135225

This is what it should look like
image

but because the first point offset uses the direction to the second point, the line draws like this
image

so it miss the yellow part( the reason the missing pixel in the original issue) and overdraw the purple part
image

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard

This comment was marked as outdated.

@chunhtai chunhtai changed the title Issues/135225 [Impeller] Curve components in stroke path use start directions as their initial offsets Sep 22, 2023
@chunhtai chunhtai requested a review from bdero September 22, 2023 17:17
@flutter-dashboard

This comment was marked as outdated.

@chunhtai
Copy link
Contributor Author

hmm looks like I broke some golden again. will take a look

@chunhtai chunhtai marked this pull request as draft September 22, 2023 17:46
@chunhtai chunhtai removed the request for review from bdero September 22, 2023 17:46
@flutter-dashboard

This comment was marked as outdated.

@chunhtai chunhtai marked this pull request as ready for review September 22, 2023 21:42
@chunhtai chunhtai changed the title [Impeller] Curve components in stroke path use start directions as their initial offsets [WIP][Impeller] Curve components in stroke path use start directions as their initial offsets Sep 22, 2023
@flutter-dashboard

This comment was marked as outdated.

@chunhtai chunhtai marked this pull request as draft September 22, 2023 22:30
@chunhtai chunhtai marked this pull request as ready for review September 25, 2023 20:23
@flutter-dashboard

This comment was marked as outdated.

@chunhtai chunhtai marked this pull request as draft September 25, 2023 20:57
@chunhtai chunhtai marked this pull request as ready for review September 26, 2023 20:45
@flutter-dashboard

This comment was marked as outdated.

@chunhtai chunhtai marked this pull request as draft September 26, 2023 21:21
@chunhtai chunhtai marked this pull request as ready for review September 27, 2023 20:24
@flutter-dashboard

This comment was marked as outdated.

@flutter-dashboard

This comment was marked as outdated.

@chinmaygarde chinmaygarde changed the title [WIP][Impeller] Curve components in stroke path use start directions as their initial offsets [Impeller] Curve components in stroke path use start directions as their initial offsets Sep 28, 2023
@flutter-dashboard
Copy link

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

Changes reported for pull request #46203 at sha 6c74888

@flutter-dashboard
Copy link

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

Changes reported for pull request #46203 at sha be3122d

Copy link
Contributor Author

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

The first commit is the straight reland of the reverted pr. The new change is in the second pr.

ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
}

TEST_P(AiksTest, CanRenderThickCurvedStrokes) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

May I have some advice? Not entirely sure why this produce clipped golden
image
locally it runs fine

Copy link
Member

Choose a reason for hiding this comment

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

I think this is just due to the max size of golden images. So if you draw the donut a bit smaller it should be able to capture the whole thing.

}
};

auto add_vertices_for_curve_compoent =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are still one more issue with curve component. the overdraw from the few start points will draw outside of the start point. I would like to address this in a later pr.
image

The start of the curve is not exactly horizontal due to this issue.

@chunhtai chunhtai requested a review from bdero September 29, 2023 18:57
Copy link
Member

@bdero bdero left a comment

Choose a reason for hiding this comment

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

LGTM! Only spotted a typo.

Apologies for the delay, this one fell off my radar during the summit.

offset = Vector2{-direction.y, direction.x} * stroke_width * 0.5;
};

auto add_vertices_for_linear_compoent =
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
auto add_vertices_for_linear_compoent =
auto add_vertices_for_linear_component =

ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
}

TEST_P(AiksTest, CanRenderThickCurvedStrokes) {
Copy link
Member

Choose a reason for hiding this comment

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

I think this is just due to the max size of golden images. So if you draw the donut a bit smaller it should be able to capture the whole thing.

@flutter-dashboard
Copy link

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

Changes reported for pull request #46203 at sha caed4a6

@bdero
Copy link
Member

bdero commented Oct 18, 2023

Huh, I just pulled down caed4a6 and I can't seem to reproduce the failed golden behavior for impeller_Play_AiksTest_CanRenderCurvedStrokes_Metal. Perhaps there's a golden tracking issue.

image

@flutter-dashboard
Copy link

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

Changes reported for pull request #46203 at sha f7b4c2c

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 24, 2023
@auto-submit auto-submit bot merged commit 2dde7ad into flutter:main Oct 24, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 24, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 24, 2023
…137180)

flutter/engine@602b513...d6a48e9

2023-10-24 [email protected] [Impeller] Allocate exact descriptor count, populate in one go. (flutter/engine#47200)
2023-10-24 [email protected] [Impeller] Curve components in stroke path use start directions as their initial offsets (flutter/engine#46203)
2023-10-24 [email protected] Roll Fuchsia Mac SDK from OUWiWfUxyMyDOlEfA... to YqSO1OByhoexFJSCr... (flutter/engine#47273)
2023-10-24 [email protected] [Impeller] Enable MSAA for OpenGLES: Take 2. (flutter/engine#47030)
2023-10-24 [email protected] Manual roll Dart SDK from 901e92d10627 to 360370ff93b0 (3 revisions) (flutter/engine#47271)
2023-10-24 [email protected] Roll Dart SDK from 901e92d10627 to 360370ff93b0 (3 revisions) (flutter/engine#47269)

Also rolling transitive DEPS:
  fuchsia/sdk/core/mac-amd64 from OUWiWfUxyMyD to YqSO1OByhoex

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
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Impeller] Regression: drawCircle don't draw a circle correctly.
2 participants