Skip to content

Conversation

@flar
Copy link
Contributor

@flar flar commented May 13, 2022

The noSuchMethod override prevents the compiler from complaining while we roll the new methods over from the engine.

@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 on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on 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.

@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label May 13, 2022
@flar
Copy link
Contributor Author

flar commented May 13, 2022

See flutter/engine#33308

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@dnfield to confirm we need these APIs, I lost track of the discussion a bit 😄

@jonahwilliams
Copy link
Contributor

(landing this would be harmless though, so still LGTM)

_screenshot.clipRect(rect, clipOp: clipOp, doAntiAlias: doAntiAlias);
}

Rect getCurrentClipBounds() {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add a trivial test that checks these are Rect.zero and Identity?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And then amend the tests when they return actual values?

Copy link
Contributor

Choose a reason for hiding this comment

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

if that would break the roll, then probably not. i'd say its tested by way of allowing the engine PR to land by unbreaking those tests. You could also implement noSuchMethod

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't think of NSM...

Copy link
Contributor

Choose a reason for hiding this comment

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

May want to have an @override on these with an ignore so that the analyzer will ignore it now but accept it when they're actually overriding something.

NSM is fine too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I went the NSM route as it's simpler. We might want to consider leaving it there permanently so that this only becomes a problem when new testing code needs the new implementations (in these screenshot tests).

@flar flar changed the title add dummy implementations of the upcoming getTransform/Clip to _MulticastCanvas add noSuchMethod to _MulticastCanvas to unblock smoke testing against forthcoming new getTransform/Clip methods May 13, 2022
@fluttergithubbot fluttergithubbot merged commit 697e930 into flutter:master May 16, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 16, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request May 16, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request May 17, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants