Fix colorspace transform with multitexture color text.

Color text glyphs can be stored across multiple atlas textures, which
requires sampling from one or another texture. However, if we use
multiple appendTextureLookup calls with the same colorspace transform
helper, it ends up generating multiple copies of its helper functions.

Instead, we will pick our texture, sample its value, and apply the
colorspace transform to the result outside the if-then-else block.

Bug: b/309422936
Bug: chromium:1499098
Change-Id: I468fe3ef323081b22537427f1f7a894e8a52073c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/775397
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
(cherry picked from commit f91d39395e85b5803dd6231ba111e59955a0b012)
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/784018
Reviewed-by: Leon Scroggins <scroggo@google.com>
2 files changed