add getAlphaf() to pixmap/bitmap

Convenient for just extracting alpha (and more efficient than getColor()) and
works for super-normal formats w/o loss of precision.

Somewhat inspired by examining multiple chrome call-sites for getColor(), where
chrome only really cared about the alpha. This new method runs about twice
as fast as getColor() for the simple cases (i.e. no colorspace xforms), and
even faster in the complex cases (since retrieving alpha doesn't care about
colorspaces).

Bug: skia:
Change-Id: I7cd5a2c7f78de781aaa69dd1aa0dba3c532fcb73
Reviewed-on: https://skia-review.googlesource.com/155606
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
5 files changed