Optimize SkColorSpaceXformCanvas for GPU-acceleration

This change ensures that SkImages are uploaded to the GPU before
applying the xform when the destination canvas is on the GPU. This
makes it possible to get hits in the texture cache and it ensures
that transforms get computed on the GPU.

This fixes a severe performance regression in Chrome that happened
when color correction was enabled.

Associated chromium patch for layout test rebaselines:
https://chromium-review.googlesource.com/c/chromium/src/+/655483

Merge dependency: Merging this change to the M-62 and M-61
branches also requires merging the following change, otherwise
there will be rendering errors:
https://skia-review.googlesource.com/c/skia/+/43562

BUG=chromium:760738

Change-Id: I49fd5ef7968272d311249c3824fe15bee4648b73
Reviewed-on: https://skia-review.googlesource.com/43183
Commit-Queue: Justin Novosad <junov@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
1 file changed