DescriptionGradients are serialized (and can be constructed) as SkColor4f + SkColorSpace
Added gradient shader factories that take SkColor4f + SkColorSpace.
Modified Descriptor to only store SkColor4f + SkColorSpace.
Existing factories make use of helper code to convert SkColor and
forward to the new factories.
Bumped SKP version to handle new gradient serialization format.
I was toying with using half-float when serializing SkColor4f,
despite my aggressive packing of flags, this format is significantly
bigger.
Also added GM to use 4f factories. This GM should (and does)
look identical to the existing gradients GM.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2370063002
Committed: https://skia.googlesource.com/skia/+/e25d71ccbcdb47c7ee7bdf13235066092ae11af3
Patch Set 1 #Patch Set 2 : Rewrote serialization #Patch Set 3 : Tag SkColor constructed gradients as sRGB #Patch Set 4 : Tweaks #Patch Set 5 : Rebase #Patch Set 6 : Bump SKP version #
Total comments: 5
Patch Set 7 : Add comment and static_assert #Patch Set 8 : Better assert? #Patch Set 9 : Widen storage for flags. Shift used bits to be contiguous. Document layout. #
Messages
Total messages: 26 (14 generated)
|