aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/HSVRoundTripTest.cpp
Commit message (Collapse)AuthorAge
* prepare to remove obsolete macrosGravatar Cary Clark2018-04-24
| | | | | | | | | | | | | | SkColorSetARGBMacro and SkColorSetARGBInline are macros which will be deleted. Replace them with a standard equivalent. R=scroggo@google.com Bug: skia:6898 Change-Id: I16e010776e991c19a375d0686ecd1b1cc4c59a9b Reviewed-on: https://skia-review.googlesource.com/123501 Auto-Submit: Cary Clark <caryclark@skia.org> Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Make SkColorToHSV and SkHSVToColor "perfect" inversesGravatar Leon Scroggins III2017-01-11
For all possible opaque SkColors, make converting to HSV and back return the original SkColor. In SkHSVToColor, store values as normalized floats (instead of converting to byte values) as long as possible. Add a test that cycles through all opaque SkColors and verifies correct conversion. BUG=b/33737498 Change-Id: I7ff61a999a271565a9ffe82ae3c9676fc49d67e3 Reviewed-on: https://skia-review.googlesource.com/6720 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>