Enforce API preconditions in Java instead of deferring to Skia.

The Skia API has been relaxed on the types of input it will accept,
but in order to preserve the old API behavior we need to test for
those conditions in Java.

bug: 27682974
Change-Id: I9a33acdcd8f55c63d2e42f1733e94bf695193ac7
1 file changed