CC: Support YUV images in PaintImage and GpuImageDecodeCache

This patch modifies PaintImage to have an interface to indicate
that the underlying image is YUV pixel format and adds a
corresponding DecodeYuv() method.

In GpuImageDecodeCache, this change adds "is YUV" variables/getters to
DecodedImageData, UploadedImageData (has_yuv_planes()), and ImageData,
as well as base:Optional arrays for the SkImages and GL texture IDs for
each Y, U, and V plane in the relevant places.

The YUV decoding path will initially be implemented for in-process
GPU rasterization and later for OOPR (Out of Process Rasterization).
Changes that affect WebP decoding in Blink will be hidden behind a flag called
kDecodeLossyWebPImagesToYUV.

Finally, because this decides whether to YUV decode based on
the result of PaintImageGenerator::QueryYUVA8, we separately modified
JPEGImageDecoder::CanDecodeToYUV (crrev.com/c/1400764) and
VideoImageGenerator::QueryYUVA8 (crrev.com/c/1418322)
to return false in order to avoid prematurely going down the YUV decode path.

See bit.ly/webp-decoding-into-yuv for the design document and
crrev.com/c/1338461 for a working prototype CL.

Bug: 900672
Change-Id: I14f60d83cc2da2382e3da296fab598597b7e8ec8
Reviewed-on: https://chromium-review.googlesource.com/c/1368687
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Khushal <khushalsagar@chromium.org>
Commit-Queue: Madeleine Barowsky <mbarowsky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625406}
6 files changed