Fail fast when trying to make a texture that's too large

This saves us from doing lots of throwaway decoding work if the image
can't be uploaded.

This is based on -- but doesn't entirely fix --
https://github.com/flutter/flutter/issues/16454

Change-Id: I4025f31f1334b715a04b4503aeb4f857851b5772
Reviewed-on: https://skia-review.googlesource.com/121104
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2 files changed