Skip to content

[WIP][camera_android_camerax] Force new Surface for each SurfaceRequest #9360

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

camsim99
Copy link
Contributor

@camsim99 camsim99 commented Jun 2, 2025

Note

This is a proof of concept for the SurfaceProducer.invalidateSurface method I am considering implementing to fix flutter/flutter#155294.

Since timing for Surface requests cannot be guaranteed, request a new Surface from SurfaceProducer.getSurface each time a Surface is requested for rendering the camera preview to.

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Camera controller.resume() throws Surface was abandoned in AppLifecycleState.resumed
1 participant