Optimize gatherTransparentRegions to account for transparent bg

gatherTransparentRegions() incorrectly takes the background into account
even when that background drawable is a completely transparent ColorDrawable
(which you can get by calling View.setBackgroundColor(0)). Checking
the opacity of the drawable allows us to ignore drawables that are not
visible.

Issue #13465427 Performance suggestion: View.setBackgroundColor(0) should set background to null

Change-Id: Ic552bf6a07cc9229fd32febc3ada73a0701cad0c
1 file changed