Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Transition rendering for Special Test of app rendering performance

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report