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

Conversation

@flar
Copy link
Contributor

@flar flar commented Dec 18, 2023

Make the implementation fields of Rect private in preparation for switching its internal operations from XYWH to LTRB fields.

Additionally [[nodiscard]] tags are added to all of the Rect methods that return a value to avoid problems with confusing mutator methods and return value methods.

@flar
Copy link
Contributor Author

flar commented Dec 18, 2023

The new additions to the Rect class all have unit tests.

The changes in the rest of the file should be simply replacing an old reference with its replacement. More than 90% of the time origin -> GetOrigin() and size -> GetSize() but a couple of the usages were converted into new methods on the Rect class combined with tests that verify that the new methods do the same thing as the manual code they are replacing.

Please evaluate as part of your reviews if you think there are additional tests needed to double-check the substitutions.

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

LGTM with a nitpick about GetRelative and a typo

@flar flar added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 18, 2023
@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 #49168 at sha bba8028

@flar
Copy link
Contributor Author

flar commented Dec 18, 2023

The goldens have identified a bug somewhere. Looking into it...

@flar
Copy link
Contributor Author

flar commented Dec 18, 2023

The goldens have identified a bug somewhere. Looking into it...

There were a couple of places where I called a Rect method without storing its return value. I've fixed those and added [[nodiscard]] directives to as many of the Rect methods as I thought would benefit from it in order to prevent future mistakes.

Before my first commit on this PR a unit test had already caught one other case where I was ignoring a return value so this scenario is likely to happen again if not for the no-discard tags just added...

@auto-submit auto-submit bot merged commit a2091ea into flutter:main Dec 18, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 18, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 19, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 19, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Dec 19, 2023
…140359)

flutter/engine@632103f...bbfee6f

2023-12-19 [email protected] Roll Skia from fff421ff633e to e5b0cdc11992 (4 revisions) (flutter/engine#49210)
2023-12-19 [email protected] Roll Skia from 63bed826008e to fff421ff633e (1 revision) (flutter/engine#49208)
2023-12-19 [email protected] Double timeout on mac builds. (flutter/engine#49205)
2023-12-18 [email protected] [Impeller] Make Rect origin and size fields private (flutter/engine#49168)

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
CoderDake pushed a commit to CoderDake/flutter that referenced this pull request Dec 28, 2023
…lutter#140359)

flutter/engine@632103f...bbfee6f

2023-12-19 [email protected] Roll Skia from fff421ff633e to e5b0cdc11992 (4 revisions) (flutter/engine#49210)
2023-12-19 [email protected] Roll Skia from 63bed826008e to fff421ff633e (1 revision) (flutter/engine#49208)
2023-12-19 [email protected] Double timeout on mac builds. (flutter/engine#49205)
2023-12-18 [email protected] [Impeller] Make Rect origin and size fields private (flutter/engine#49168)

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.

2 participants