Jonah Williams 7da7f8b890 [Impeller] eagerly flip backdrop back to onscreen. (flutter/engine#55983)
Fixes https://github.com/flutter/flutter/issues/157112

We currently track the number of backdrop filters in a frame. When the end of the frame is reached, we do a blit from the offscreen texture to the onscreen texture. Howeever, this extra blit is unecessary once we know we've rendered the last backdrop - and we can instead start the last render pass with the onscreen. This cuts out a fairly expensive blit.

this can only be done on iOS physical devices, vulkan, and some GLES - as emulated blends also use the backdrop.

## Before

Shader time is lower but timeline claims about 2.8ms and about ~800ms of blit pass.

![image](https://github.com/user-attachments/assets/557d12ed-b169-4806-a2d1-88db9f24d8a1)

## After

Timeline is ~2.1 ms with no blit pass. Tracks with numbers above.

![image](https://github.com/user-attachments/assets/ad547131-af0a-4247-91a2-deeb3ffda8e9)
2024-10-22 17:54:38 +00:00
..