DescriptionGrColor4f is yet another 4f color type, unfortunately.
- Sk4f would be my choice, but it's not allowed in include/
- SkColor4f and SkPM4f are specified to be unpremultiplied/premultiplied, whereas GrColor (and GrColor4f) are either, depending on context.
This adds 12 bytes to GrPaint. Not sure if we want to pay that price. The precision loss for a single value (vs. in a gradient, etc...) may not justify changing the storage type here. Easy enough to back that part out, while still keeping the 4f intermediate type for the helper math that it adds, and for storage and parameter passing in other locations.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2088303002
Committed: https://skia.googlesource.com/skia/+/a4535a34d1b317543307df6901debfefe7132569
Patch Set 1 #Patch Set 2 : Linearize paint color, always set as 4f #
Total comments: 1
Patch Set 3 : Remove global flag - SkColor is sRGB in gamma-correct mode! #Patch Set 4 : Rebase #Patch Set 5 : Fix conversion to SkColor4f with new channel order #
Messages
Total messages: 19 (10 generated)
|