Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is invalid region in Android?

Tags:

java

android

Under "How Android Draws Views" topic, there is such a sentence :

Drawing begins with the root node of the layout. It is requested to measure and draw the layout tree. Drawing is handled by walking the tree and rendering each View that intersects the invalid region.

And I didn't quite understand the term "invalid region".

Here is the source article of the quotation.

Can someone elaborate it?

Thanks.

like image 825
Tarik Avatar asked Dec 05 '10 14:12

Tarik


1 Answers

The "invalid region" is essentially the portion of the screen that requires repainting. It's used to make painting more efficient by only repainting the invalid region and leaving the rest alone.

like image 68
Cameron Skinner Avatar answered Oct 23 '22 23:10

Cameron Skinner