This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Commit 1a8ef6e
authored
Request another frame in ImageReaderSurfaceProducer.dequeueImage if more images are pending in the queue (#55944)
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#1557871 parent 179be9b commit 1a8ef6e
File tree
2 files changed
+61
-1
lines changed- shell/platform/android
- io/flutter/embedding/engine/renderer
- test/io/flutter/embedding/engine/renderer
2 files changed
+61
-1
lines changedLines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
556 | 560 | | |
557 | 561 | | |
558 | 562 | | |
| |||
630 | 634 | | |
631 | 635 | | |
632 | 636 | | |
| 637 | + | |
633 | 638 | | |
634 | 639 | | |
635 | 640 | | |
| |||
679 | 684 | | |
680 | 685 | | |
681 | 686 | | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
682 | 702 | | |
683 | 703 | | |
684 | 704 | | |
| |||
1245 | 1265 | | |
1246 | 1266 | | |
1247 | 1267 | | |
1248 | | - | |
| 1268 | + | |
| 1269 | + | |
1249 | 1270 | | |
1250 | 1271 | | |
1251 | 1272 | | |
| |||
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
826 | 826 | | |
827 | 827 | | |
828 | 828 | | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
829 | 868 | | |
0 commit comments