Encode paletted PNGs more efficiently (part 2)

Many PNGs have multiple distinct pixels with zero alpha.  This
CL allows us to treat all of those pixels as a single zero pixel.

This saves space in the color palette and also may help save
memory pages when we skip writing zeros.

There is also a potential disadvantage: if someone intended to decode
this image as unpremultiplied with particular transfer modes where
their color components have an effect even though alpha is zero,
this will prevent that.  At the moment, we do not support unpremul as
a source, so this won't affect anyone trying to draw with the view
system.

This change originated in:
https://googleplex-android-review.git.corp.google.com/#/c/854580/

Change-Id: I702c7bd22d431cc7c775ed29bbd73c930f945ca3
1 file changed