From ce4cf72e3487f661e53f6d0c3416c9b58da4fd00 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Thu, 10 May 2018 11:29:15 -0400 Subject: non-linear blending first steps Code: - Add a non-linear blending bit and makeNonlinearBlending() to SkColorSpace - remove enough F16=linear checks to make it possible to create surfaces and encode pngs with nonlinear F16 Testing: - add "esrgb" software config to DM, run it - add "srgbnl" software config, run it - deemphasize importance of "srgb" config on bots - update unit tests to reflect relaxed F16 constraints - add a new unit test file with _really_ basic tests, and a new unit test that's not working yet Bug: skia:7942 Change-Id: I8ac042bdf9f3d791765393b68fd9256375184d83 Reviewed-on: https://skia-review.googlesource.com/127325 Reviewed-by: Brian Osman Commit-Queue: Mike Klein --- tests/CodecTest.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/CodecTest.cpp') diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp index ceb10a10df..474cdc6931 100644 --- a/tests/CodecTest.cpp +++ b/tests/CodecTest.cpp @@ -1144,22 +1144,22 @@ static void test_conversion_possible(skiatest::Reporter* r, const char* path, SkBitmap bm; bm.allocPixels(infoF16); SkCodec::Result result = codec->getPixels(infoF16, bm.getPixels(), bm.rowBytes()); - REPORTER_ASSERT(r, SkCodec::kInvalidConversion == result); + REPORTER_ASSERT(r, SkCodec::kSuccess == result); result = codec->startScanlineDecode(infoF16); if (supportsScanlineDecoder) { - REPORTER_ASSERT(r, SkCodec::kInvalidConversion == result); + REPORTER_ASSERT(r, SkCodec::kSuccess == result); } else { REPORTER_ASSERT(r, SkCodec::kUnimplemented == result - || SkCodec::kInvalidConversion == result); + || SkCodec::kSuccess == result); } result = codec->startIncrementalDecode(infoF16, bm.getPixels(), bm.rowBytes()); if (supportsIncrementalDecoder) { - REPORTER_ASSERT(r, SkCodec::kInvalidConversion == result); + REPORTER_ASSERT(r, SkCodec::kSuccess == result); } else { REPORTER_ASSERT(r, SkCodec::kUnimplemented == result - || SkCodec::kInvalidConversion == result); + || SkCodec::kSuccess == result); } infoF16 = infoF16.makeColorSpace(infoF16.colorSpace()->makeLinearGamma()); -- cgit v1.2.3