From: Matt Sarett Date: Thu, 27 Oct 2016 16:44:18 +0000 (-0400) Subject: Improve comments describing common sRGB curves X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~73^2~388 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b3d1c2ea48c4fa5afcb62d8fb09f04d15e88a9bc;p=platform%2Fupstream%2FlibSkiaSharp.git Improve comments describing common sRGB curves BUG=skia:5897 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4037 Change-Id: Id1253cc9b960aad47bc0f9b7e40f10830d46d98d Reviewed-on: https://skia-review.googlesource.com/4037 Reviewed-by: Heather Miller Commit-Queue: Matt Sarett --- diff --git a/src/core/SkColorSpace_ICC.cpp b/src/core/SkColorSpace_ICC.cpp index b0563c8..cba2ee1 100644 --- a/src/core/SkColorSpace_ICC.cpp +++ b/src/core/SkColorSpace_ICC.cpp @@ -357,8 +357,8 @@ static SkGammas::Type parse_gamma(SkGammas::Data* outData, SkColorSpaceTransferF } if (26 == count) { - // The magic values were chosen because they match a very common LCMS sRGB - // gamma table. + // The magic values match a clever "minimum size" approach to representing sRGB. + // code.facebook.com/posts/411525055626587/under-the-hood-improving-facebook-photos if (0 == read_big_endian_u16((const uint8_t*) &table[0]) && 3062 == read_big_endian_u16((const uint8_t*) &table[6]) && 12824 == read_big_endian_u16((const uint8_t*) &table[12]) && @@ -371,7 +371,7 @@ static SkGammas::Type parse_gamma(SkGammas::Data* outData, SkColorSpaceTransferF if (4096 == count) { // The magic values were chosen because they match Nikon, Epson, and - // LCMS sRGB gamma tables (all of which use different rounding rules). + // lcms2 sRGB gamma tables (all of which use different rounding rules). if (0 == read_big_endian_u16((const uint8_t*) &table[0]) && 950 == read_big_endian_u16((const uint8_t*) &table[515]) && 3342 == read_big_endian_u16((const uint8_t*) &table[1025]) &&