skia2/gn/effects.gni
John Stiles 8c7c709aaa Convert GLHighContrastFilterEffect to an .fp file.
The fuzzer detected a bug in our handling of null child processors.
Rather than attempt to further tweak a hand-rolled effect, it seemed
more productive to convert it into a full-fledged .fp file. This
provides a very high degree of confidence that the basics are done
properly, for a relatively low amount of effort.

Contrast calculation has also been optimized slightly. The original
shader calculated (1+c/1-c) separately for every pixel. This is now done
once, in Make(). Also, if contrast adjustment is set to zero, the
contrast block is fully omitted.

Change-Id: I2af4708536b249e03c3ebede9b10fc1125eadb7b
Bug: oss-fuzz:24039
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301942
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-07-10 20:54:33 +00:00

71 lines
2.7 KiB
Plaintext

# Copyright 2016 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Things are easiest for everyone if these source paths are absolute.
_src = get_path_info("../src", "abspath")
_include = get_path_info("../include", "abspath")
skia_effects_public = [
"$_include/effects/Sk1DPathEffect.h",
"$_include/effects/Sk2DPathEffect.h",
"$_include/effects/SkBlurDrawLooper.h",
"$_include/effects/SkBlurMaskFilter.h",
"$_include/effects/SkColorMatrix.h",
"$_include/effects/SkColorMatrixFilter.h",
"$_include/effects/SkCornerPathEffect.h",
"$_include/effects/SkDashPathEffect.h",
"$_include/effects/SkDiscretePathEffect.h",
"$_include/effects/SkGradientShader.h",
"$_include/effects/SkHighContrastFilter.h",
"$_include/effects/SkLayerDrawLooper.h",
"$_include/effects/SkLumaColorFilter.h",
"$_include/effects/SkOverdrawColorFilter.h",
"$_include/effects/SkPerlinNoiseShader.h",
"$_include/effects/SkShaderMaskFilter.h",
"$_include/effects/SkTableColorFilter.h",
"$_include/effects/SkTableMaskFilter.h",
]
skia_effects_sources = [
"$_src/c/sk_effects.cpp",
"$_src/effects/Sk1DPathEffect.cpp",
"$_src/effects/Sk2DPathEffect.cpp",
"$_src/effects/SkColorMatrix.cpp",
"$_src/effects/SkColorMatrixFilter.cpp",
"$_src/effects/SkCornerPathEffect.cpp",
"$_src/effects/SkDashPathEffect.cpp",
"$_src/effects/SkDiscretePathEffect.cpp",
"$_src/effects/SkEmbossMask.cpp",
"$_src/effects/SkEmbossMask.h",
"$_src/effects/SkEmbossMaskFilter.cpp",
"$_src/effects/SkHighContrastFilter.cpp",
"$_src/effects/SkLayerDrawLooper.cpp",
"$_src/effects/SkLumaColorFilter.cpp",
"$_src/effects/SkOpPathEffect.cpp",
"$_src/effects/SkOverdrawColorFilter.cpp",
"$_src/effects/SkPackBits.cpp",
"$_src/effects/SkPackBits.h",
"$_src/effects/SkShaderMaskFilter.cpp",
"$_src/effects/SkTableColorFilter.cpp",
"$_src/effects/SkTableMaskFilter.cpp",
"$_src/effects/SkTrimPathEffect.cpp",
"$_src/shaders/SkPerlinNoiseShader.cpp",
"$_src/shaders/gradients/Sk4fGradientBase.cpp",
"$_src/shaders/gradients/Sk4fGradientBase.h",
"$_src/shaders/gradients/Sk4fGradientPriv.h",
"$_src/shaders/gradients/Sk4fLinearGradient.cpp",
"$_src/shaders/gradients/Sk4fLinearGradient.h",
"$_src/shaders/gradients/SkGradientShader.cpp",
"$_src/shaders/gradients/SkGradientShaderPriv.h",
"$_src/shaders/gradients/SkLinearGradient.cpp",
"$_src/shaders/gradients/SkLinearGradient.h",
"$_src/shaders/gradients/SkRadialGradient.cpp",
"$_src/shaders/gradients/SkRadialGradient.h",
"$_src/shaders/gradients/SkSweepGradient.cpp",
"$_src/shaders/gradients/SkSweepGradient.h",
"$_src/shaders/gradients/SkTwoPointConicalGradient.cpp",
"$_src/shaders/gradients/SkTwoPointConicalGradient.h",
]