Add Bitmap#eraseColor(@ColorLong) + helpers

Bug: 120904891
Test: I162451ebf807f3a8a44679e5c10406468c922500

- Add Bitmap#eraseColor(@ColorLong). This allows erasing in ColorSpaces
  besides SRGB. New API is hidden pending API-council approval. It is
  @TestApi so it can be used by the new tests.
- Rewrite Bitmap#erase(@ColorInt)'s internals. The ColorInt should be
  treated as an SRGB color. The old code (deep in SkPixmap::erase)
  treated the color as being in the SkColorSpace of the SkBitmap.
- Update getNativeColorSpace to return immediately when it throws.
  Existing callers should never throw anyway, since they do their own
  checks (and throws) in Java before reaching this method. But relying
  on this method to properly return simplifies the new callers.

Change-Id: I1b736934ce1b8294c827bb61c2a363207569da4f
4 files changed