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

[Impeller] Remove Rect field accesses from aiks subdirectory - #47628

Merged
auto-submit[bot] merged 1 commit into
flutter-team-archive:mainfrom
flar:remove-Rect-fields-aiks
Nov 3, 2023
Merged

auto-submit[bot] merged 1 commit into
flutter-team-archive:mainfrom
flar:remove-Rect-fields-aiks

Conversation

@flar

@flar flar commented Nov 2, 2023

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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.

@bdero bdero left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

flar commented Nov 2, 2023 •

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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
Copy Markdown
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-team-archive:main Nov 3, 2023
auto-submit Bot pushed a commit to flutter/flutter that referenced this pull request Nov 3, 2023
flutter-team-archive/engine@677040f...035740c

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

Development

Successfully merging this pull request may close these issues.

4 participants