(prev: Frame, next: Frame)
| 792 | } |
| 793 | |
| 794 | export function shouldResetForResize(prev: Frame, next: Frame): boolean { |
| 795 | if (prev.viewport.width !== 0 && next.viewport.width !== prev.viewport.width) { |
| 796 | if (canStayIncrementalAcrossWidthResize(prev, next)) { |
| 797 | return false |
| 798 | } |
| 799 | return true |
| 800 | } |
| 801 | |
| 802 | if (next.viewport.height >= prev.viewport.height) { |
| 803 | return false |
| 804 | } |
| 805 | |
| 806 | if ( |
| 807 | prev.cursor.y >= next.viewport.height || |
| 808 | next.cursor.y >= next.viewport.height |
| 809 | ) { |
| 810 | return true |
| 811 | } |
| 812 | |
| 813 | if (prev.screen.height <= next.viewport.height) { |
| 814 | return false |
| 815 | } |
| 816 | |
| 817 | return !canStayIncrementalAcrossHeightShrink(prev, next) |
| 818 | } |
| 819 | |
| 820 | export function canRepaintFromPreviousOutputTop(frame: Frame): boolean { |
| 821 | return ( |
no test coverage detected