Testing Display Performance
Speed Up your app
What can GPU monitor do?
Analyze GPU performance to see the time it takes to draw each frame in real time
GPU Monitor Usage Readiness
- Root phone
- The GPU Profile switch in the developer options opens
- Android Studio 1.4+
GPU Monitor Boot
When you click on the GPU in Android Monitor, the tool is already open, and when you are working in the selected app interface, the drawing data is displayed in real time in the panel:
4 types of data from GPU Monitor
5.1 Previous data only blue, red, yellow three colors, 5.1 added purple data
Draw (Blue)
Represents the time-consuming of the View.ondraw () method, which is mainly used to build displaylist objects that will be converted to OpenGL commands, and the GPU can only read OpenGL commands.
If this place takes a lot of time, the view is more complex.
The time represented by the blue area is the time that the Displaylist object was created.
Prepare (purple)
After 5.1, what the UI thread thread does is divided into 2 threads: the UI thread and the render thread. The new render thread thread converts the Displaylist object generated by the draw process into the OpenGL command, which is then sent to the GPU, at which point the UI thread can be idle to process the next frame's data. If you send too many resources, this place will take a lot of time.
The purple area represents the time that the UI thread takes to transfer data to the render thread.
Process (red)
The red area represents the time when the OpenGL command was created
Execute (Yellow)
The yellow area represents the time it takes to send OpenGL commands to the GPU
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
GPU Profile for Android performance specific testing