print colors which fail the asserts when they do
Change-Id: I013275af0d2798b4efa08e4141683dd39d3047f8 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275409 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
db20afc1bf
commit
c01d7ab425
@ -386,10 +386,14 @@ namespace {
|
||||
if (src_in_gamut) {
|
||||
// An in-gamut src blended with an in-gamut dst should stay in gamut.
|
||||
// Being in-gamut implies all channels are in [0,1], so no need to clamp.
|
||||
assert_true(eq(src.r, clamp(src.r, splat(0.0f), bit_cast(splat(0x3f80'0001)))));
|
||||
assert_true(eq(src.g, clamp(src.g, splat(0.0f), bit_cast(splat(0x3f80'0001)))));
|
||||
assert_true(eq(src.b, clamp(src.b, splat(0.0f), bit_cast(splat(0x3f80'0001)))));
|
||||
assert_true(eq(src.a, clamp(src.a, splat(0.0f), bit_cast(splat(0x3f80'0001)))));
|
||||
assert_true(eq(src.r,
|
||||
clamp(src.r, splat(0.0f), bit_cast(splat(0x3f80'0001)))), src.r);
|
||||
assert_true(eq(src.g,
|
||||
clamp(src.g, splat(0.0f), bit_cast(splat(0x3f80'0001)))), src.g);
|
||||
assert_true(eq(src.b,
|
||||
clamp(src.b, splat(0.0f), bit_cast(splat(0x3f80'0001)))), src.b);
|
||||
assert_true(eq(src.a,
|
||||
clamp(src.a, splat(0.0f), bit_cast(splat(0x3f80'0001)))), src.a);
|
||||
} else if (SkColorTypeIsNormalized(params.colorType)) {
|
||||
src.r = clamp(src.r, splat(0.0f), splat(1.0f));
|
||||
src.g = clamp(src.g, splat(0.0f), splat(1.0f));
|
||||
|
Loading…
Reference in New Issue
Block a user