In order to improve app performance, I encounter GPU Overdraw problem. According to Romain Guy's Article, here are the basic Colors:
No color means there is no overdraw. The pixel was painted only once. In this example, you can see that the background is intact.
Blue indicates an overdraw of 1x. The pixel was painted twice. Large blue areas are acceptable (if the entire window is blue, you can get rid of one layer.)
Green indicates an overdraw of 2x. The pixel was painted three times. Medium-sized green areas are acceptable but you should try to optimize them away.
Light red indicates an overdraw of 3x. The pixel was painted four times. Small light red areas are acceptable.
Dark red indicates an overdraw of 4x or more. The pixel was painted 5 times or more. This is wrong. Fix it.`
To Test that, I create a simple project with XML as follows
XML Code
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity"
android:layout_margin="50dp"
android:background="#fff">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/hello_world"/>
</RelativeLayout>
and get result:
Then I tried Whatsapp's overdraw. To my suprise:
So How Whatsapp is drawing background wallpaper with no overdraw (no blue tint) but in my simple xml, even coloring gives one overdraw??
PS: I have intentionally added background color to show that adding color gives overdraw but adding wallpaper doesn't