Better handle colorTypes in GrTexutreProducer.

This change does a bunch of stuff that all sadly needs to land together.

First this moves the fallback for bitmap upload from proxyprovider to
GrBitmapTextureMaker. This is mostly a code organization cleanup but also
allows us to manager all colorType changes in the GrTextureProducers
directly.

Next this change hides colorType and deletes colorInfo getters from
public. Looking at the colorType of the producer doesn't really make
sense (outside the producer) since we have multiple fallbacks that
could happen in terms of format for the produced textures.

Next this makes sure that after the ctor is called, the internal
colorType stored will always be the used colorType by returned textures.
The only caveat to this is if a texture needs a copy for repeat mode
and we end up needing to render to fallback configs. Modulo repeat issue
the only other thing to change colorType is uploading a CPU bitmap if
we fallback to 8888, but this can be known in the ctor if this will
happen.

Finally, the only users of GrTextureProducer that really need to know
the correct colorType to use with the returned texture are those that
are then creating an Image. However, non of these cases even need to
pass in sampling params so we don't hit the need for repeat copies
and thus colorType changes. So now the refTextureProxy call (the one
without params) returns a pair of the proxy and colorType. The producer
just returns its colorType cause nothing could have changed that.

Bug: skia:6718
Change-Id: Ic5b5810606440ff943910933a3880d62875c9c16
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264836
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
21 files changed