This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Request another frame in ImageReaderSurfaceProducer.dequeueImage if more images are pending in the queue #55944
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ImageReaderSurfaceProducer will request a frame when an image is enqueued. But there is no guarantee that each request will produce an additional frame.
Multiple requests happening within one vsync interval could be merged into one frame. If no other frame is scheduled, then some images will remain in the queue and the image shown on screen will not be the latest image.
With this change, ImageReaderSurfaceProducer will continue requesting frames after consuming an image if the queue is not empty.
Fixes flutter/flutter#156903
Fixes flutter/flutter#155787