Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web] Cleanup Vector3 #42096

Merged
merged 2 commits into from
May 19, 2023
Merged

[web] Cleanup Vector3 #42096

merged 2 commits into from
May 19, 2023

Conversation

mdebbar
Copy link
Contributor

@mdebbar mdebbar commented May 17, 2023

We have limited use of Vector3 in the engine, so I converted it into a record and removed almost all of its methods.

Converting it to a record also means it's not mutable anymore, which is a positive in my book. That required a few minor changes in Matrix4 but nothing major.

@mdebbar mdebbar requested a review from yjbanov May 17, 2023 16:55
@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label May 17, 2023
@mdebbar mdebbar marked this pull request as draft May 17, 2023 21:07
@flutter-dashboard
Copy link

This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again.

@mdebbar mdebbar changed the title [web] Deduplicate Matrix4.perspectiveTransform and Vector3.applyProjection [web] Cleanup Vector3 May 18, 2023
@mdebbar mdebbar marked this pull request as ready for review May 18, 2023 17:15
Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

lgtm

final Float32List _v3storage;
const Vector3 kUnitX = (x: 1.0, y: 0.0, z: 0.0);
const Vector3 kUnitY = (x: 0.0, y: 1.0, z: 0.0);
const Vector3 kUnitZ = (x: 0.0, y: 0.0, z: 1.0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! This actually guarantees immutability, unlike the previous method of leaving comments with warnings.

@mdebbar mdebbar added the autosubmit Merge PR when tree becomes green via auto submit App label May 19, 2023
@auto-submit auto-submit bot merged commit 2e6b1e6 into flutter:main May 19, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 19, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 19, 2023
…127196)

flutter/engine@e9178e1...2e6b1e6

2023-05-19 [email protected] [web] Cleanup Vector3 (flutter/engine#42096)

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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
CaseyHillers pushed a commit to CaseyHillers/flutter that referenced this pull request May 24, 2023
…lutter#127196)

flutter/engine@e9178e1...2e6b1e6

2023-05-19 [email protected] [web] Cleanup Vector3 (flutter/engine#42096)

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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@mdebbar mdebbar deleted the transform branch June 22, 2023 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants