Skip to content
Commit 33fcd11b authored by Matt Sarett's avatar Matt Sarett
Browse files

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
parent fc1159c8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment