high-contrast filter as runtime

I think this is good to go.

Originally I had been careful to treat nullptr dst as gamma=2, but then
seeing the GPU impl treating all colorspaces as gamma=2 made me realize
it's can't be that important to preserve pixel-exact results here.  It's
not possible with a single codebase... in many situations the existing
CPU and GPU backends draw differently with identical settings.

Beyond that sort of obvious intentional difference, I've also tried to
port as few bugs forward from the old implementations as possible.  The
one I notice most clearly is in the GPU code,

    @if (invertBrightness) {
        color = half4(1) - color;
    }

which I think probably should be `color.rgb = 1 - color.rgb`, leaving
alpha alone.

Change-Id: I098cdced4772445c70ce4577bdd1c93c2e42824c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368276
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
1 file changed