• Mike Klein's avatar
    remove SK_LEGACY_SRGB_STAGE_CHOICE · 1b07639c
    Mike Klein authored
    Whenever we linearize or encode sRGB, we use custom fast routines to do
    this; other transfer functions go through a slower general case path.
    
    We "recently" realized that the specialized sRGB routines are only
    accurate over an input domain of about [-2,2].  This is normally fine,
    as the common input domain is normalized values in [0,1], but sometimes
    we deal with colors outside a given gamut.  In the limit, a
    from_sRGB(to_sRGB(x)) roundtrip asymptotes to 8, not x like you'd want!
    
    So flipping this flag switches us to keep using the fast sRGB math when
    we're sure the inputs are normalized, but switch over to the general
    case if we even suspect we're not.
    
    Change-Id: Ie604c6d7d3a5d9655ed1af09d832be5ac951b375
    Reviewed-on: https://chromium-review.googlesource.com/c/1459397
    Auto-Submit: Mike Klein <mtklein@chromium.org>
    Commit-Queue: Florin Malita <fmalita@chromium.org>
    Reviewed-by: default avatarFlorin Malita <fmalita@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#630641}
    1b07639c
SVGFEComponentTransferElement-dom-tableValues-attr-expected.png 75.3 KB
SVGFEComponentTransferElement-dom-tableValues-attr-expected.png