Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Transition rendering for Special Test of app rendering performance

Shulou Source: shulou.com Published: 2022-06-03 03:45:06 10月01日 Update

1. Understanding transition drawing

Transition painting means that a pixel is drawn repeatedly many times in a frame. For example, for cascading cards, we need to draw layer by layer, and to draw the invisible bottom layer is the so-called transition drawing, which wastes GPU performance.

two。 Observe transition drawing

Fortunately, we can use the developer options in the phone settings, open Show GPU Overdraw (debug GPU transition rendering), choose to display the transition rendering area, and observe the Overdraw situation on the UI.

Blue, light green, light red, and crimson represent four different degrees of Overdraw. Our goal is to minimize the red Overdraw and see more blue areas (the blue surface is drawn once in the same frame, light green indicates twice, and the next increment).

Overdraw is sometimes because there are a lot of overlaps in your UI layout, and sometimes because of unnecessary overlapping backgrounds. For example, an Activity has a background, and then the Layout in it has its own background, while the sub-View has its own background. Simply by moving the necessary background images, this can reduce a large number of red Overdraw areas and increase the proportion of blue areas. This measure can significantly improve program performance.

Tags: Background area blue that is situation red observation performance different significant lucky representative pixel card can pass picture layout bottom layer developer said Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Apple macOS Shulou Tech Info Microsoft