what does "show overdraw counter" really mean and why Admob increases it so much?

1k views Asked by At

Background

On Android, there is a way to find the GPU overdraw in order to measure how well your app performs with the GPU.

Starting with Kitkat, there are new ways to do it:

enter image description here

The "show overdraw areas" shows the how bad each drawing is (from nothing, to blue, to green, to yellow, and to red).

The second one ("Show areas for Deutoranomaly") is the same, but for people with color blindness.

The problem

I can't find any documentation about the last one "show overdraw counter".

I've tried enabling it, and for some places on the screen I saw a counter that changes its number on some cases. It also slows down the device much more than that other choices.

In addition, I've ran it on my own app, and even though the listView performs very well, because of Admob it shows a very high, colored red, value (around 5-6). I don't know why it happens, since it's just a listView and an adView inside a linearLayout...

The question

What does this counter mean?

Why does Admob increase it so much? Is it a bad thing? What should I do with it?

Removing Admob decreases the value to a decent one (around 1-2, depending on the theme being used) , or at least that's what I assume.


EDIT: I've found a nice explanation about it on this video. They say there something like that :

for every window there is a counter that tells you how many times you've drawn the screen and the color that tells you if you've done it well (green=good, red=bad). The number has a "." because it's the average number.

but I still don't understand why Admob Adview makes it so bad


EDIT: I got an answer on Admob Google Groups (here), saying I should disable the GPU on Adview in order to avoid the extra overdraw:

I see. So the issue seems related to hardware acceleration - if you turn off hardware acceleration on the AdView this doesn't happen:

adView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);

It worked, but I don't get how could this be a good thing. I mean, now the CPU is responsible of the view, right?

0

There are 0 answers