Skip to content
Commit 4c4259b3 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

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
parent 5ca575ae
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