This presentation is about the essence of overdraw and the problems it causes. There are also hints on finding and overcoming overdraw.
Presentation by Rostyslav Lesovyi (Lead Software Engineer, GlobalLogic, Lviv) and Oleksandr Kravchenko (Software Engineer, GlobalLogic, Lviv) delivered at GlobalLogic Lviv Mobile TechTalk, November 13, 2014.
More details -
http://www.globallogic.com.ua/press-releases/lviv-mobile-2014-coverage
8. Mobile vs. Desktop - Smartest Android in the World!!!
Adreno 330
GFlops
130
CONFIDENTIAL
9. Mobile vs. Desktop - Is not so smart after all...
Adreno 330
130
CONFIDENTIAL
AMD A10
Intel HD 5000
615 500
NVidia GTX Titan
GFlops
AMD 7970 GHz
GFlops
4500 4300
10. Mobile vs. Desktop - But there is still hope!
Adreno 330
130
CONFIDENTIAL
GFlops AMD A10
Intel HD 5000
GFlops
615 500
11. CONFIDENTIAL
Android Devices Zoo
Hi-End devices
Nexus 6, Samsung Galaxy S5, HTC One, etc.
Can handle most issues without influencing user
experience even with complex UI hierarchy
12. CONFIDENTIAL
Android Devices Zoo
Low-End devices
most pre-ICS devices like HTC Wildfire S
Some devices can deliver smooth user experience for
simple UI, other will fail even for optimal UI
Note: most embedded devices go here
13. CONFIDENTIAL
Android Devices Zoo
Mid-End devices
Nexus S, Samsung Galaxy S2, HTC Sensation, etc.
Capable of creating smooth user experience but can
easily fail if UI is not optimized
Note: most STB devices go here
16. How to detect overdraw with “GPU overdraw”?
● No color means there is no overdraw. So, you are
CONFIDENTIAL
awesome!
● Blue indicates an overdraw of 1x.
● Green indicates an overdraw of 2x.
● Light red indicates an overdraw of 3x.
● Dark red indicates an overdraw of 4x or more. This
is wrong. Fix it.
17. How to detect overdraw with “Hierarchy viewer”?
1. Select Hierarchy viewer perspective in ADT or
CONFIDENTIAL
Device monitor
2. Select a window that you want to inspect
3. Click Load button
4. Export it as Photoshop document when needed
18. How to detect overdraw with “Tracer for OpenGL”?
1. Select Tracer for OpenGL perspective in ADT
CONFIDENTIAL
or Device monitor
2. Click Collects OpenGL information
3. Set package and activity
4. Check traces.
19. CONFIDENTIAL
How to fight overdraw?
● draw less :)
● flatten and simplify view hierarchy
● change window’s background when applicable
● transparent segments for 9-patch won’t be drawn, but transparent bitmaps will
P.S.:
● never ever use requestLayout() for animations
● be careful with layers and dynamically changing views