Let’s talk about rendering the screen, okay?

The CPU submits the calculated content to the GPU, which, after rendering, puts the rendered result into the frame buffer

After writing to the cache, the bitmap data will be displayed on the screen during the next runloop

What is off-screen rendering?

Off-screen rendering is

When using rounded corners, shadows, and masks, the composition of the layer properties is specified as not being added to the screen until it has been precomposed. So you need to create a new buffer for rendering.

Rendering off screen means. It needs to be rendered in an off-screen context before it can be displayed on screen.

Why does an off-screen render appear stuck?

The reason why the off-screen rendering looks stuck is

Create a new buffer

2. Multiple context switches are carried out in the off-screen rendering process. The first is to switch the current screen to off-screen, where you need to switch the context from the screen to off-screen. After the off-screen rendering is done, the off-screen cache rendering is drawn to the screen, where the context needs to be switched from off-screen to on-screen. This context switch is costly.