Fix A2B JPEG images on GPU backed xform or color-managed canvas

A2B images can't be transformed on the GPU, so ensure that
they're "converted" before being uploaded. (This may just
create a new lazy image with an updated color space).

Then, when we're converting JPEG images (YUV) to textures,
don't allow GPU decode if the result needs to go through
A2B conversion (again, we can't do this). In that case,
we just ask the generator (codec) for RGB data, which will
trigger correct CPU conversion before the upload.

Eventually this will be rewritten further, because we won't
allow A2B data in SkColorSpace, but for now this fixes a
problem that's not actually affecting any clients, but is
blocking a GrColorSpaceXform refactor.

Change-Id: I1ebef4a90773d21ec4011ed1ac16aed486ba5539
Reviewed-on: https://skia-review.googlesource.com/133447
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2 files changed