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

[camerax] Change buildPreview to return Texture versus FutureBuilder #6021

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

camsim99
Copy link
Contributor

@camsim99 camsim99 commented Jan 31, 2024

Changes the buildPreview implementation to return a Texture versus a FutureBuilder that would ultimately return that same Texture.

The FutureBuilder depended on checking a condition that should be true by default assuming createCamera was called prior. This seems to be an assumption made consistently across other platform implementations (including camera_android-- see source), so this PR is achieving consistency with them.

Fixes flutter/flutter#140567. Thanks to @davidmartos96 for the push to investigate deeper on that issue!

Pre-launch Checklist

@camsim99 camsim99 requested review from bparrishMines and a team January 31, 2024 20:33
@@ -1,3 +1,8 @@
## 0.5.0+29

* Modifies `buildPreview` to return `Texture` that maps to camera preview, building in the assumption
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider linking to the issue that is being fixed.

@camsim99 camsim99 added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 1, 2024
@auto-submit auto-submit bot merged commit 450251a into flutter:main Feb 1, 2024
78 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 2, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 2, 2024
flutter/packages@5b48c44...d37fb0a

2024-02-02 32242716+ricardoamador@users.noreply.github.com Add a link the different possible Android virtual device configs (flutter/packages#6033)
2024-02-01 32242716+ricardoamador@users.noreply.github.com Update the emulator versions and expose cipd. (flutter/packages#6025)
2024-02-01 stuartmorgan@google.com [tool] Add details to missing gradle coverage error (flutter/packages#6029)
2024-02-01 stuartmorgan@google.com [file_selector] Fix comment typo (flutter/packages#6027)
2024-02-01 43054281+camsim99@users.noreply.github.com [camerax] Change `buildPreview` to return `Texture` versus `FutureBuilder` (flutter/packages#6021)
2024-02-01 engine-flutter-autoroll@skia.org Manual roll Flutter from c65ab4d to e02e207 (38 revisions) (flutter/packages#6028)
2024-02-01 engine-flutter-autoroll@skia.org Manual roll Flutter from 75a2e5b to c65ab4d (22 revisions) (flutter/packages#6026)
2024-02-01 engine-flutter-autoroll@skia.org Roll Flutter from ace9181 to 75a2e5b (16 revisions) (flutter/packages#6017)
2024-02-01 JeroenWeener@users.noreply.github.com [webview_flutter] Support for handling basic authentication requests (flutter/packages#5727)
2024-01-31 stuartmorgan@google.com [tool] Extend `flutter test` workaround to other desktops (flutter/packages#6024)
2024-01-31 katelovett@google.com [two_dimensional_scrollables] Merged cells for TableView (flutter/packages#5917)
2024-01-31 tessertaha@gmail.com [rfw] Restore RFW to 100% coverage after `ButtonBar` update (flutter/packages#6020)
2024-01-31 louisehsu@google.com [in_app_purchase] Convert storefront(), transactions(), canMakePayment(), and addPayment() to pigeon (flutter/packages#5910)
2024-01-31 reidbaker@google.com [in_app_purchase] Add play country code api (flutter/packages#5941)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com,rmistry@google.com 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
arc-yong pushed a commit to Arctuition/packages-arc that referenced this pull request Jun 14, 2024
…lder` (flutter#6021)

Changes the `buildPreview` implementation to return a `Texture` versus a `FutureBuilder` that would ultimately return that same `Texture`.

The `FutureBuilder` depended on checking a condition that should be true by default assuming `createCamera` was called prior. This seems to be an assumption made consistently across other platform implementations (including `camera_android`-- see [source](https://github.com/flutter/packages/blob/7b1ae1f4cceea02f330716e701c6dcd9f0ca3f7e/packages/camera/camera_android/lib/src/android_camera.dart#L520)), so this PR is achieving consistency with them.

Fixes flutter/flutter#140567. Thanks to @davidmartos96 for the push to investigate deeper on that issue!
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 p: camera
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[camerax] Preview flickering when calling setState
2 participants