GrConstColorProcessor uses 4f colors in the destination space
authorBrian Osman <brianosman@google.com>
Tue, 25 Oct 2016 14:51:28 +0000 (10:51 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Wed, 26 Oct 2016 00:48:33 +0000 (00:48 +0000)
commit618d304eb394d64779be0ecdc5eff898242faa8f
treec4773dd205ae0a34b903333238c6daafc4852ba7
parent18b61f9cb9d0bea03dc4f69f63f53ad44f171526
GrConstColorProcessor uses 4f colors in the destination space

Many places that construct one are explicitly specifying opaque white or
transparent black, which we can assume (based on the semantics of the
operation) should remain (0,0,0,0) or (1,1,1,1), so that's simple.

In other cases, we convert our source color to destination space.

One wrinkle is tht SkColorFilter now needs to know the destination color
space, due to SkModeColorFilter.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3903

Change-Id: I4969c0260588f4021300733f601b47dc606adf79
Reviewed-on: https://skia-review.googlesource.com/3903
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
29 files changed:
experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp
gm/constcolorprocessor.cpp
include/core/SkColorFilter.h
include/effects/SkColorCubeFilter.h
include/effects/SkGammaColorFilter.h
include/effects/SkLumaColorFilter.h
include/gpu/GrColor.h
include/gpu/effects/GrConstColorProcessor.h
src/core/SkColorFilter.cpp
src/core/SkColorFilterShader.cpp
src/core/SkColorMatrixFilterRowMajor255.cpp
src/core/SkColorMatrixFilterRowMajor255.h
src/core/SkColorShader.cpp
src/core/SkComposeShader.cpp
src/core/SkModeColorFilter.cpp
src/core/SkModeColorFilter.h
src/effects/SkColorCubeFilter.cpp
src/effects/SkGammaColorFilter.cpp
src/effects/SkLumaColorFilter.cpp
src/effects/SkPerlinNoiseShader.cpp
src/effects/SkTableColorFilter.cpp
src/effects/SkXfermodeImageFilter.cpp
src/gpu/GrFragmentProcessor.cpp
src/gpu/GrPaint.cpp
src/gpu/SkGr.cpp
src/gpu/effects/GrConstColorProcessor.cpp
src/gpu/effects/GrConvexPolyEffect.cpp
src/gpu/effects/GrXfermodeFragmentProcessor.cpp
tests/GpuColorFilterTest.cpp