fix labels in P3 gm
We first draw interpolating in P3, UPM+PM, then in sRGB, UPM+PM. Looks like the last gradient got its labels as a copy and paste from the second. Add a todo to test the middle color somehow. That's where we either are or were going wrong, and it's an easy way to test interpolation. Change-Id: Ib7ff385c9244e33ee13fd206279119de25ce2eb6 Reviewed-on: https://skia-review.googlesource.com/c/196581 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
1223e7fc0a
commit
4dc70ecbdb
@ -190,6 +190,8 @@ DEF_SIMPLE_GM(p3, canvas, 450, 1300) {
|
||||
|
||||
canvas->translate(0,80);
|
||||
|
||||
// TODO(mtklein): sample and check the middle points of these gradients too.
|
||||
|
||||
// Draw a gradient from P3 red to P3 green interpolating in unpremul P3, checking the corners.
|
||||
{
|
||||
|
||||
@ -286,13 +288,13 @@ DEF_SIMPLE_GM(p3, canvas, 450, 1300) {
|
||||
nullptr/*local matrix*/));
|
||||
canvas->drawRect({10,10,70,70}, paint);
|
||||
canvas->save();
|
||||
compare_pixel("PM P3 gradient, P3 red",
|
||||
compare_pixel("PM sRGB gradient, P3 red",
|
||||
canvas, 10,10,
|
||||
{1,0,0,1}, p3.get());
|
||||
|
||||
canvas->translate(180, 0);
|
||||
|
||||
compare_pixel("PM P3 gradient, P3 green",
|
||||
compare_pixel("PM sRGB gradient, P3 green",
|
||||
canvas, 69,69,
|
||||
{0,1,0,1}, p3.get());
|
||||
canvas->restore();
|
||||
|
Loading…
Reference in New Issue
Block a user