From c01d7ab4254f67fc83c4e2ef528c7fe13a6a2cc0 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Thu, 5 Mar 2020 14:00:13 -0600 Subject: [PATCH] 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 Reviewed-by: Herb Derby Commit-Queue: Mike Klein --- src/core/SkVMBlitter.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/core/SkVMBlitter.cpp b/src/core/SkVMBlitter.cpp index 88f1637f10..aa689fa0cc 100644 --- a/src/core/SkVMBlitter.cpp +++ b/src/core/SkVMBlitter.cpp @@ -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));