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 Nov 2, 2023

These changes move any code in impeller/aiks that accessed the internal fields of Rect to using either the appropriate convenience methods for the operation or the getters for those properties.

This is a simple code refactoring and should be covered by existing tests.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie or stuartmorgan on the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

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

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. I think this needs a no semantic change exemption?

@matanlurey
Copy link
Contributor

I'd argue this does need a test, since the existing test suite doesn't seem to have one. E.g. Test...CullsWhenFlatOnTopBottom and Test...CullsWhenFlatOnLeftRight.

Or in other words, lack of an existing test doesn't make a change test exempt.

(Just a reminder, neither Brandon or I are authorized to declare this PR test exempt, so this is just our opinion and we wanted not to write tests, we'd have to ask one of the test-exemption owners)

@flar
Copy link
Contributor Author

flar commented Nov 2, 2023

Just a note that the changes to ClipRRect which were ever so slightly more complicated than a simple "getter replacement" are already tested by the test suite here
https://github.com/flutter/engine/blob/dd620fcf9af72729d57565666cca09e52370eeb5/impeller/aiks/canvas_unittests.cc#L169C1-L259C1:

[ RUN      ] AiksCanvasTest.RRectClipIntersectAgainstEmptyCullRect
[       OK ] AiksCanvasTest.RRectClipIntersectAgainstEmptyCullRect (0 ms)
[ RUN      ] AiksCanvasTest.RRectClipDiffAgainstEmptyCullRect
[       OK ] AiksCanvasTest.RRectClipDiffAgainstEmptyCullRect (0 ms)
[ RUN      ] AiksCanvasTest.RRectClipIntersectAgainstCullRect
[       OK ] AiksCanvasTest.RRectClipIntersectAgainstCullRect (0 ms)
[ RUN      ] AiksCanvasTest.RRectClipDiffAgainstNonCoveredCullRect
[       OK ] AiksCanvasTest.RRectClipDiffAgainstNonCoveredCullRect (0 ms)
[ RUN      ] AiksCanvasTest.RRectClipDiffAgainstVPartiallyCoveredCullRect
[       OK ] AiksCanvasTest.RRectClipDiffAgainstVPartiallyCoveredCullRect (0 ms)
[ RUN      ] AiksCanvasTest.RRectClipDiffAgainstVFullyCoveredCullRect
[       OK ] AiksCanvasTest.RRectClipDiffAgainstVFullyCoveredCullRect (0 ms)
[ RUN      ] AiksCanvasTest.RRectClipDiffAgainstHPartiallyCoveredCullRect
[       OK ] AiksCanvasTest.RRectClipDiffAgainstHPartiallyCoveredCullRect (0 ms)
[ RUN      ] AiksCanvasTest.RRectClipDiffAgainstHFullyCoveredCullRect
[       OK ] AiksCanvasTest.RRectClipDiffAgainstHFullyCoveredCullRect (0 ms)

@matanlurey
Copy link
Contributor

Just a note that the changes to ClipRRect which were ever so slightly more complicated than a simple "getter replacement" are already tested by the test suite here https://github.com/flutter/engine/blob/dd620fcf9af72729d57565666cca09e52370eeb5/impeller/aiks/canvas_unittests.cc#L169C1-L259C1:

[ RUN      ] AiksCanvasTest.RRectClipIntersectAgainstEmptyCullRect
[       OK ] AiksCanvasTest.RRectClipIntersectAgainstEmptyCullRect (0 ms)
[ RUN      ] AiksCanvasTest.RRectClipDiffAgainstEmptyCullRect
[       OK ] AiksCanvasTest.RRectClipDiffAgainstEmptyCullRect (0 ms)
[ RUN      ] AiksCanvasTest.RRectClipIntersectAgainstCullRect
[       OK ] AiksCanvasTest.RRectClipIntersectAgainstCullRect (0 ms)
[ RUN      ] AiksCanvasTest.RRectClipDiffAgainstNonCoveredCullRect
[       OK ] AiksCanvasTest.RRectClipDiffAgainstNonCoveredCullRect (0 ms)
[ RUN      ] AiksCanvasTest.RRectClipDiffAgainstVPartiallyCoveredCullRect
[       OK ] AiksCanvasTest.RRectClipDiffAgainstVPartiallyCoveredCullRect (0 ms)
[ RUN      ] AiksCanvasTest.RRectClipDiffAgainstVFullyCoveredCullRect
[       OK ] AiksCanvasTest.RRectClipDiffAgainstVFullyCoveredCullRect (0 ms)
[ RUN      ] AiksCanvasTest.RRectClipDiffAgainstHPartiallyCoveredCullRect
[       OK ] AiksCanvasTest.RRectClipDiffAgainstHPartiallyCoveredCullRect (0 ms)
[ RUN      ] AiksCanvasTest.RRectClipDiffAgainstHFullyCoveredCullRect
[       OK ] AiksCanvasTest.RRectClipDiffAgainstHFullyCoveredCullRect (0 ms)

I had looked for ClipRRect not RRectClip, so if you think these cover the usecases you refactored then yeah I'd say covered under existing tests.

@stuartmorgan-g
Copy link
Contributor

test-exempt: code refactor with no semantic change

@flar flar added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 3, 2023
@auto-submit auto-submit bot merged commit 32ab06e into flutter:main Nov 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 3, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 3, 2023
…137871)

flutter/engine@677040f...035740c

2023-11-03 [email protected] Roll Fuchsia Linux SDK from ho9FqsUD0hxh0b8to... to 8tJt8KJzTzbwwQlUE... (flutter/engine#47666)
2023-11-03 [email protected] Roll Fuchsia Mac SDK from y-hqwYkPPVT6RwmAS... to 5GLArzquQ4eL56vdy... (flutter/engine#47667)
2023-11-03 [email protected] Roll Skia from c0ca9f2fd828 to 77aeee3b81a5 (1 revision) (flutter/engine#47663)
2023-11-03 [email protected] [Impeller] Remove Rect field accesses from aiks subdirectory (flutter/engine#47628)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from ho9FqsUD0hxh to 8tJt8KJzTzbw
  fuchsia/sdk/core/mac-amd64 from y-hqwYkPPVT6 to 5GLArzquQ4eL

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

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants