diff options
author | Greg Daniel <egdaniel@google.com> | 2018-04-06 10:37:55 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-06 18:27:53 +0000 |
commit | 3e8c3458f036da88eca1225a5c6a2cce228f894e (patch) | |
tree | b910cd1a3a25994bbf7b52effde770fae7a2fb2f | |
parent | 4961a938586e3c46cf80f15ecb70a011324bfe59 (diff) |
Make generated effects from sksl fp files not need SK_SUPPORT_GPU
Bug: skia:
Change-Id: I42a5c7fe7dc35a23290c8daa754c9fcce07f76fb
Reviewed-on: https://skia-review.googlesource.com/119010
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
46 files changed, 9 insertions, 93 deletions
diff --git a/gn/effects.gni b/gn/effects.gni index 7ea768ba25..94d56e3b68 100644 --- a/gn/effects.gni +++ b/gn/effects.gni @@ -10,9 +10,6 @@ _include = get_path_info("../include", "abspath") skia_effects_sources = [ "$_src/c/sk_effects.cpp", - "$_src/effects/GrAlphaThresholdFragmentProcessor.cpp", - "$_src/effects/GrAlphaThresholdFragmentProcessor.h", - "$_src/effects/Sk1DPathEffect.cpp", "$_src/effects/Sk2DPathEffect.cpp", "$_src/effects/SkAlphaThresholdFilter.cpp", diff --git a/gn/gpu.gni b/gn/gpu.gni index b3f4eb1680..c9fd2f3008 100644 --- a/gn/gpu.gni +++ b/gn/gpu.gni @@ -319,6 +319,8 @@ skia_gpu_sources = [ "$_src/gpu/effects/GrAARectEffect.cpp", "$_src/gpu/effects/GrAARectEffect.h", + "$_src/gpu/effects/GrAlphaThresholdFragmentProcessor.cpp", + "$_src/gpu/effects/GrAlphaThresholdFragmentProcessor.h", "$_src/gpu/effects/GrArithmeticFP.cpp", "$_src/gpu/effects/GrArithmeticFP.h", "$_src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp", diff --git a/gn/sksl.gni b/gn/sksl.gni index 4a223573b4..bce75c8599 100644 --- a/gn/sksl.gni +++ b/gn/sksl.gni @@ -29,8 +29,8 @@ skia_sksl_sources = [ ] skia_gpu_processor_sources = [ - "$_src/effects/GrAlphaThresholdFragmentProcessor.fp", "$_src/gpu/effects/GrAARectEffect.fp", + "$_src/gpu/effects/GrAlphaThresholdFragmentProcessor.fp", "$_src/gpu/effects/GrArithmeticFP.fp", "$_src/gpu/effects/GrBlurredEdgeFragmentProcessor.fp", "$_src/gpu/effects/GrCircleBlurFragmentProcessor.fp", diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp index 37c62f837c..488429b37a 100644 --- a/src/effects/SkAlphaThresholdFilter.cpp +++ b/src/effects/SkAlphaThresholdFilter.cpp @@ -16,13 +16,13 @@ #include "SkRegion.h" #if SK_SUPPORT_GPU -#include "GrAlphaThresholdFragmentProcessor.h" #include "GrColorSpaceXform.h" #include "GrContext.h" #include "GrFixedClip.h" #include "GrRenderTargetContext.h" #include "GrTextureProxy.h" #include "effects/GrSimpleTextureEffect.h" +#include "effects/GrAlphaThresholdFragmentProcessor.h" #endif class SkAlphaThresholdFilterImpl : public SkImageFilter { diff --git a/src/gpu/effects/GrAARectEffect.cpp b/src/gpu/effects/GrAARectEffect.cpp index c1301980e3..663471e503 100644 --- a/src/gpu/effects/GrAARectEffect.cpp +++ b/src/gpu/effects/GrAARectEffect.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrAARectEffect.fp; do not modify. **************************************************************************************************/ #include "GrAARectEffect.h" -#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" @@ -116,4 +115,3 @@ std::unique_ptr<GrFragmentProcessor> GrAARectEffect::TestCreate(GrProcessorTestD return fp; } #endif -#endif diff --git a/src/gpu/effects/GrAARectEffect.h b/src/gpu/effects/GrAARectEffect.h index 676f6c0abe..efb7ecbdc5 100644 --- a/src/gpu/effects/GrAARectEffect.h +++ b/src/gpu/effects/GrAARectEffect.h @@ -11,7 +11,6 @@ #ifndef GrAARectEffect_DEFINED #define GrAARectEffect_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrFragmentProcessor.h" #include "GrCoordTransform.h" class GrAARectEffect : public GrFragmentProcessor { @@ -40,4 +39,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/effects/GrAlphaThresholdFragmentProcessor.cpp b/src/gpu/effects/GrAlphaThresholdFragmentProcessor.cpp index f174ff5285..176e812821 100644 --- a/src/effects/GrAlphaThresholdFragmentProcessor.cpp +++ b/src/gpu/effects/GrAlphaThresholdFragmentProcessor.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrAlphaThresholdFragmentProcessor.fp; do not modify. **************************************************************************************************/ #include "GrAlphaThresholdFragmentProcessor.h" -#if SK_SUPPORT_GPU inline GrFragmentProcessor::OptimizationFlags GrAlphaThresholdFragmentProcessor::optFlags( float outerThreshold) { @@ -119,4 +118,3 @@ std::unique_ptr<GrFragmentProcessor> GrAlphaThresholdFragmentProcessor::TestCrea bounds); } #endif -#endif diff --git a/src/effects/GrAlphaThresholdFragmentProcessor.fp b/src/gpu/effects/GrAlphaThresholdFragmentProcessor.fp index 38d6a61bc5..38d6a61bc5 100644 --- a/src/effects/GrAlphaThresholdFragmentProcessor.fp +++ b/src/gpu/effects/GrAlphaThresholdFragmentProcessor.fp diff --git a/src/effects/GrAlphaThresholdFragmentProcessor.h b/src/gpu/effects/GrAlphaThresholdFragmentProcessor.h index 37ce967a33..1c0cd2eb91 100644 --- a/src/effects/GrAlphaThresholdFragmentProcessor.h +++ b/src/gpu/effects/GrAlphaThresholdFragmentProcessor.h @@ -11,7 +11,6 @@ #ifndef GrAlphaThresholdFragmentProcessor_DEFINED #define GrAlphaThresholdFragmentProcessor_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrFragmentProcessor.h" #include "GrCoordTransform.h" class GrAlphaThresholdFragmentProcessor : public GrFragmentProcessor { @@ -55,4 +54,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrArithmeticFP.cpp b/src/gpu/effects/GrArithmeticFP.cpp index 5c381d91a7..b7d37a844e 100644 --- a/src/gpu/effects/GrArithmeticFP.cpp +++ b/src/gpu/effects/GrArithmeticFP.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrArithmeticFP.fp; do not modify. **************************************************************************************************/ #include "GrArithmeticFP.h" -#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" @@ -101,4 +100,3 @@ GrArithmeticFP::GrArithmeticFP(const GrArithmeticFP& src) std::unique_ptr<GrFragmentProcessor> GrArithmeticFP::clone() const { return std::unique_ptr<GrFragmentProcessor>(new GrArithmeticFP(*this)); } -#endif diff --git a/src/gpu/effects/GrArithmeticFP.h b/src/gpu/effects/GrArithmeticFP.h index 3042b7e01c..7debf266ab 100644 --- a/src/gpu/effects/GrArithmeticFP.h +++ b/src/gpu/effects/GrArithmeticFP.h @@ -11,7 +11,6 @@ #ifndef GrArithmeticFP_DEFINED #define GrArithmeticFP_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrFragmentProcessor.h" #include "GrCoordTransform.h" class GrArithmeticFP : public GrFragmentProcessor { @@ -54,4 +53,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp b/src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp index 532691499c..9542b1a829 100644 --- a/src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp +++ b/src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrBlurredEdgeFragmentProcessor.fp; do not modify. **************************************************************************************************/ #include "GrBlurredEdgeFragmentProcessor.h" -#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" @@ -60,4 +59,3 @@ GrBlurredEdgeFragmentProcessor::GrBlurredEdgeFragmentProcessor( std::unique_ptr<GrFragmentProcessor> GrBlurredEdgeFragmentProcessor::clone() const { return std::unique_ptr<GrFragmentProcessor>(new GrBlurredEdgeFragmentProcessor(*this)); } -#endif diff --git a/src/gpu/effects/GrBlurredEdgeFragmentProcessor.h b/src/gpu/effects/GrBlurredEdgeFragmentProcessor.h index 5fa50ea82c..7bbdd321ec 100644 --- a/src/gpu/effects/GrBlurredEdgeFragmentProcessor.h +++ b/src/gpu/effects/GrBlurredEdgeFragmentProcessor.h @@ -11,7 +11,6 @@ #ifndef GrBlurredEdgeFragmentProcessor_DEFINED #define GrBlurredEdgeFragmentProcessor_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrFragmentProcessor.h" #include "GrCoordTransform.h" class GrBlurredEdgeFragmentProcessor : public GrFragmentProcessor { @@ -37,4 +36,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrCircleBlurFragmentProcessor.cpp b/src/gpu/effects/GrCircleBlurFragmentProcessor.cpp index 618da34fcc..efd9ee754a 100644 --- a/src/gpu/effects/GrCircleBlurFragmentProcessor.cpp +++ b/src/gpu/effects/GrCircleBlurFragmentProcessor.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrCircleBlurFragmentProcessor.fp; do not modify. **************************************************************************************************/ #include "GrCircleBlurFragmentProcessor.h" -#if SK_SUPPORT_GPU #include "GrProxyProvider.h" @@ -346,4 +345,3 @@ std::unique_ptr<GrFragmentProcessor> GrCircleBlurFragmentProcessor::TestCreate( return GrCircleBlurFragmentProcessor::Make(testData->proxyProvider(), circle, sigma); } #endif -#endif diff --git a/src/gpu/effects/GrCircleBlurFragmentProcessor.h b/src/gpu/effects/GrCircleBlurFragmentProcessor.h index 25dcb9ade6..3670a98dbe 100644 --- a/src/gpu/effects/GrCircleBlurFragmentProcessor.h +++ b/src/gpu/effects/GrCircleBlurFragmentProcessor.h @@ -11,7 +11,6 @@ #ifndef GrCircleBlurFragmentProcessor_DEFINED #define GrCircleBlurFragmentProcessor_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrFragmentProcessor.h" #include "GrCoordTransform.h" class GrCircleBlurFragmentProcessor : public GrFragmentProcessor { @@ -48,4 +47,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrCircleEffect.cpp b/src/gpu/effects/GrCircleEffect.cpp index c5c21fa873..f1324d6875 100644 --- a/src/gpu/effects/GrCircleEffect.cpp +++ b/src/gpu/effects/GrCircleEffect.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrCircleEffect.fp; do not modify. **************************************************************************************************/ #include "GrCircleEffect.h" -#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" @@ -120,4 +119,3 @@ std::unique_ptr<GrFragmentProcessor> GrCircleEffect::TestCreate(GrProcessorTestD return GrCircleEffect::Make(et, center, radius); } #endif -#endif diff --git a/src/gpu/effects/GrCircleEffect.h b/src/gpu/effects/GrCircleEffect.h index 676075c052..cb28f60595 100644 --- a/src/gpu/effects/GrCircleEffect.h +++ b/src/gpu/effects/GrCircleEffect.h @@ -11,7 +11,6 @@ #ifndef GrCircleEffect_DEFINED #define GrCircleEffect_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrFragmentProcessor.h" #include "GrCoordTransform.h" class GrCircleEffect : public GrFragmentProcessor { @@ -50,4 +49,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp index b71a29d273..d2967fee19 100644 --- a/src/gpu/effects/GrConfigConversionEffect.cpp +++ b/src/gpu/effects/GrConfigConversionEffect.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrConfigConversionEffect.fp; do not modify. **************************************************************************************************/ #include "GrConfigConversionEffect.h" -#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" @@ -70,4 +69,3 @@ std::unique_ptr<GrFragmentProcessor> GrConfigConversionEffect::TestCreate( return std::unique_ptr<GrFragmentProcessor>(new GrConfigConversionEffect(pmConv)); } #endif -#endif diff --git a/src/gpu/effects/GrConfigConversionEffect.h b/src/gpu/effects/GrConfigConversionEffect.h index 0decae9689..7ebbe73eb9 100644 --- a/src/gpu/effects/GrConfigConversionEffect.h +++ b/src/gpu/effects/GrConfigConversionEffect.h @@ -11,7 +11,6 @@ #ifndef GrConfigConversionEffect_DEFINED #define GrConfigConversionEffect_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrClip.h" #include "GrContext.h" @@ -155,4 +154,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrConstColorProcessor.cpp b/src/gpu/effects/GrConstColorProcessor.cpp index b72d44d5d1..b175119baf 100644 --- a/src/gpu/effects/GrConstColorProcessor.cpp +++ b/src/gpu/effects/GrConstColorProcessor.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrConstColorProcessor.fp; do not modify. **************************************************************************************************/ #include "GrConstColorProcessor.h" -#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" @@ -109,4 +108,3 @@ std::unique_ptr<GrFragmentProcessor> GrConstColorProcessor::TestCreate(GrProcess return GrConstColorProcessor::Make(color, mode); } #endif -#endif diff --git a/src/gpu/effects/GrConstColorProcessor.h b/src/gpu/effects/GrConstColorProcessor.h index 65d50db1ba..e36a38f31d 100644 --- a/src/gpu/effects/GrConstColorProcessor.h +++ b/src/gpu/effects/GrConstColorProcessor.h @@ -11,7 +11,6 @@ #ifndef GrConstColorProcessor_DEFINED #define GrConstColorProcessor_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrFragmentProcessor.h" #include "GrCoordTransform.h" class GrConstColorProcessor : public GrFragmentProcessor { @@ -66,4 +65,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrDitherEffect.cpp b/src/gpu/effects/GrDitherEffect.cpp index 9ca7b248a2..17c8776524 100644 --- a/src/gpu/effects/GrDitherEffect.cpp +++ b/src/gpu/effects/GrDitherEffect.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrDitherEffect.fp; do not modify. **************************************************************************************************/ #include "GrDitherEffect.h" -#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" @@ -74,4 +73,3 @@ std::unique_ptr<GrFragmentProcessor> GrDitherEffect::TestCreate(GrProcessorTestD return std::unique_ptr<GrFragmentProcessor>(new GrDitherEffect(range)); } #endif -#endif diff --git a/src/gpu/effects/GrDitherEffect.h b/src/gpu/effects/GrDitherEffect.h index d1bc72bf4e..9355a5907c 100644 --- a/src/gpu/effects/GrDitherEffect.h +++ b/src/gpu/effects/GrDitherEffect.h @@ -11,7 +11,6 @@ #ifndef GrDitherEffect_DEFINED #define GrDitherEffect_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrFragmentProcessor.h" #include "GrCoordTransform.h" class GrDitherEffect : public GrFragmentProcessor { @@ -66,4 +65,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrEllipseEffect.cpp b/src/gpu/effects/GrEllipseEffect.cpp index 0d040cac95..6c0d5b913a 100644 --- a/src/gpu/effects/GrEllipseEffect.cpp +++ b/src/gpu/effects/GrEllipseEffect.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrEllipseEffect.fp; do not modify. **************************************************************************************************/ #include "GrEllipseEffect.h" -#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" @@ -144,4 +143,3 @@ std::unique_ptr<GrFragmentProcessor> GrEllipseEffect::TestCreate(GrProcessorTest *testData->caps()->shaderCaps()); } #endif -#endif diff --git a/src/gpu/effects/GrEllipseEffect.h b/src/gpu/effects/GrEllipseEffect.h index ef47cb03c7..62625fcec3 100644 --- a/src/gpu/effects/GrEllipseEffect.h +++ b/src/gpu/effects/GrEllipseEffect.h @@ -11,7 +11,6 @@ #ifndef GrEllipseEffect_DEFINED #define GrEllipseEffect_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrShaderCaps.h" #include "GrFragmentProcessor.h" @@ -51,4 +50,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrLumaColorFilterEffect.cpp b/src/gpu/effects/GrLumaColorFilterEffect.cpp index 0fbbdd6d07..cfa2a2f864 100644 --- a/src/gpu/effects/GrLumaColorFilterEffect.cpp +++ b/src/gpu/effects/GrLumaColorFilterEffect.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrLumaColorFilterEffect.fp; do not modify. **************************************************************************************************/ #include "GrLumaColorFilterEffect.h" -#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" @@ -48,4 +47,3 @@ GrLumaColorFilterEffect::GrLumaColorFilterEffect(const GrLumaColorFilterEffect& std::unique_ptr<GrFragmentProcessor> GrLumaColorFilterEffect::clone() const { return std::unique_ptr<GrFragmentProcessor>(new GrLumaColorFilterEffect(*this)); } -#endif diff --git a/src/gpu/effects/GrLumaColorFilterEffect.h b/src/gpu/effects/GrLumaColorFilterEffect.h index 45fda7499b..a8b737af3f 100644 --- a/src/gpu/effects/GrLumaColorFilterEffect.h +++ b/src/gpu/effects/GrLumaColorFilterEffect.h @@ -11,7 +11,6 @@ #ifndef GrLumaColorFilterEffect_DEFINED #define GrLumaColorFilterEffect_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrFragmentProcessor.h" #include "GrCoordTransform.h" class GrLumaColorFilterEffect : public GrFragmentProcessor { @@ -41,4 +40,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrMagnifierEffect.cpp b/src/gpu/effects/GrMagnifierEffect.cpp index eaaef10268..752a81bd1b 100644 --- a/src/gpu/effects/GrMagnifierEffect.cpp +++ b/src/gpu/effects/GrMagnifierEffect.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrMagnifierEffect.fp; do not modify. **************************************************************************************************/ #include "GrMagnifierEffect.h" -#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" @@ -193,4 +192,3 @@ std::unique_ptr<GrFragmentProcessor> GrMagnifierEffect::TestCreate(GrProcessorTe return effect; } #endif -#endif diff --git a/src/gpu/effects/GrMagnifierEffect.h b/src/gpu/effects/GrMagnifierEffect.h index 4100095d9e..7888f9c737 100644 --- a/src/gpu/effects/GrMagnifierEffect.h +++ b/src/gpu/effects/GrMagnifierEffect.h @@ -11,7 +11,6 @@ #ifndef GrMagnifierEffect_DEFINED #define GrMagnifierEffect_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrFragmentProcessor.h" #include "GrCoordTransform.h" class GrMagnifierEffect : public GrFragmentProcessor { @@ -62,4 +61,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrOverdrawFragmentProcessor.cpp b/src/gpu/effects/GrOverdrawFragmentProcessor.cpp index 89b4caab95..48f242992e 100644 --- a/src/gpu/effects/GrOverdrawFragmentProcessor.cpp +++ b/src/gpu/effects/GrOverdrawFragmentProcessor.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrOverdrawFragmentProcessor.fp; do not modify. **************************************************************************************************/ #include "GrOverdrawFragmentProcessor.h" -#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" @@ -91,4 +90,3 @@ GrOverdrawFragmentProcessor::GrOverdrawFragmentProcessor(const GrOverdrawFragmen std::unique_ptr<GrFragmentProcessor> GrOverdrawFragmentProcessor::clone() const { return std::unique_ptr<GrFragmentProcessor>(new GrOverdrawFragmentProcessor(*this)); } -#endif diff --git a/src/gpu/effects/GrOverdrawFragmentProcessor.h b/src/gpu/effects/GrOverdrawFragmentProcessor.h index 6d5f008701..3fd441db64 100644 --- a/src/gpu/effects/GrOverdrawFragmentProcessor.h +++ b/src/gpu/effects/GrOverdrawFragmentProcessor.h @@ -11,7 +11,6 @@ #ifndef GrOverdrawFragmentProcessor_DEFINED #define GrOverdrawFragmentProcessor_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrFragmentProcessor.h" #include "GrCoordTransform.h" class GrOverdrawFragmentProcessor : public GrFragmentProcessor { @@ -55,4 +54,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrPremulInputFragmentProcessor.cpp b/src/gpu/effects/GrPremulInputFragmentProcessor.cpp index 49ab53df75..d5373d536c 100644 --- a/src/gpu/effects/GrPremulInputFragmentProcessor.cpp +++ b/src/gpu/effects/GrPremulInputFragmentProcessor.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrPremulInputFragmentProcessor.fp; do not modify. **************************************************************************************************/ #include "GrPremulInputFragmentProcessor.h" -#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" @@ -50,4 +49,3 @@ GrPremulInputFragmentProcessor::GrPremulInputFragmentProcessor( std::unique_ptr<GrFragmentProcessor> GrPremulInputFragmentProcessor::clone() const { return std::unique_ptr<GrFragmentProcessor>(new GrPremulInputFragmentProcessor(*this)); } -#endif diff --git a/src/gpu/effects/GrPremulInputFragmentProcessor.h b/src/gpu/effects/GrPremulInputFragmentProcessor.h index 5f005c138d..1b5ea81a96 100644 --- a/src/gpu/effects/GrPremulInputFragmentProcessor.h +++ b/src/gpu/effects/GrPremulInputFragmentProcessor.h @@ -11,7 +11,6 @@ #ifndef GrPremulInputFragmentProcessor_DEFINED #define GrPremulInputFragmentProcessor_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrFragmentProcessor.h" #include "GrCoordTransform.h" class GrPremulInputFragmentProcessor : public GrFragmentProcessor { @@ -38,4 +37,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrRRectBlurEffect.cpp b/src/gpu/effects/GrRRectBlurEffect.cpp index efb168a565..9ab844a51d 100644 --- a/src/gpu/effects/GrRRectBlurEffect.cpp +++ b/src/gpu/effects/GrRRectBlurEffect.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrRRectBlurEffect.fp; do not modify. **************************************************************************************************/ #include "GrRRectBlurEffect.h" -#if SK_SUPPORT_GPU std::unique_ptr<GrFragmentProcessor> GrRRectBlurEffect::Make(GrContext* context, float sigma, float xformedSigma, @@ -164,4 +163,3 @@ std::unique_ptr<GrFragmentProcessor> GrRRectBlurEffect::TestCreate(GrProcessorTe return GrRRectBlurEffect::Make(d->context(), sigma, sigma, rrect, rrect); } #endif -#endif diff --git a/src/gpu/effects/GrRRectBlurEffect.h b/src/gpu/effects/GrRRectBlurEffect.h index b59d1be7d6..d1316e8a5b 100644 --- a/src/gpu/effects/GrRRectBlurEffect.h +++ b/src/gpu/effects/GrRRectBlurEffect.h @@ -11,7 +11,6 @@ #ifndef GrRRectBlurEffect_DEFINED #define GrRRectBlurEffect_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrClip.h" #include "GrContext.h" @@ -128,4 +127,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrRectBlurEffect.cpp b/src/gpu/effects/GrRectBlurEffect.cpp index 4f2c4bacdb..f537361cad 100644 --- a/src/gpu/effects/GrRectBlurEffect.cpp +++ b/src/gpu/effects/GrRectBlurEffect.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrRectBlurEffect.fp; do not modify. **************************************************************************************************/ #include "GrRectBlurEffect.h" -#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" @@ -164,4 +163,3 @@ std::unique_ptr<GrFragmentProcessor> GrRectBlurEffect::TestCreate(GrProcessorTes return GrRectBlurEffect::Make(data->proxyProvider(), SkRect::MakeWH(width, height), sigma); } #endif -#endif diff --git a/src/gpu/effects/GrRectBlurEffect.h b/src/gpu/effects/GrRectBlurEffect.h index e6d777980f..47e9dc3851 100644 --- a/src/gpu/effects/GrRectBlurEffect.h +++ b/src/gpu/effects/GrRectBlurEffect.h @@ -11,7 +11,6 @@ #ifndef GrRectBlurEffect_DEFINED #define GrRectBlurEffect_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrProxyProvider.h" #include "SkBlurMask.h" @@ -106,4 +105,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp index 9e6e9cf991..5e3e6979ca 100644 --- a/src/gpu/effects/GrSimpleTextureEffect.cpp +++ b/src/gpu/effects/GrSimpleTextureEffect.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrSimpleTextureEffect.fp; do not modify. **************************************************************************************************/ #include "GrSimpleTextureEffect.h" -#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" @@ -84,4 +83,3 @@ std::unique_ptr<GrFragmentProcessor> GrSimpleTextureEffect::TestCreate( return GrSimpleTextureEffect::Make(testData->textureProxy(texIdx), matrix, params); } #endif -#endif diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h index 119f11e305..fcd29b81ae 100644 --- a/src/gpu/effects/GrSimpleTextureEffect.h +++ b/src/gpu/effects/GrSimpleTextureEffect.h @@ -11,7 +11,6 @@ #ifndef GrSimpleTextureEffect_DEFINED #define GrSimpleTextureEffect_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrFragmentProcessor.h" #include "GrCoordTransform.h" class GrSimpleTextureEffect : public GrFragmentProcessor { @@ -69,4 +68,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrUnpremulInputFragmentProcessor.cpp b/src/gpu/effects/GrUnpremulInputFragmentProcessor.cpp index e9888123e5..b3565d74f9 100644 --- a/src/gpu/effects/GrUnpremulInputFragmentProcessor.cpp +++ b/src/gpu/effects/GrUnpremulInputFragmentProcessor.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrUnpremulInputFragmentProcessor.fp; do not modify. **************************************************************************************************/ #include "GrUnpremulInputFragmentProcessor.h" -#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramBuilder.h" @@ -51,4 +50,3 @@ GrUnpremulInputFragmentProcessor::GrUnpremulInputFragmentProcessor( std::unique_ptr<GrFragmentProcessor> GrUnpremulInputFragmentProcessor::clone() const { return std::unique_ptr<GrFragmentProcessor>(new GrUnpremulInputFragmentProcessor(*this)); } -#endif diff --git a/src/gpu/effects/GrUnpremulInputFragmentProcessor.h b/src/gpu/effects/GrUnpremulInputFragmentProcessor.h index 56e9d3095b..4e40b3bb4b 100644 --- a/src/gpu/effects/GrUnpremulInputFragmentProcessor.h +++ b/src/gpu/effects/GrUnpremulInputFragmentProcessor.h @@ -11,7 +11,6 @@ #ifndef GrUnpremulInputFragmentProcessor_DEFINED #define GrUnpremulInputFragmentProcessor_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrFragmentProcessor.h" #include "GrCoordTransform.h" class GrUnpremulInputFragmentProcessor : public GrFragmentProcessor { @@ -38,4 +37,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp index d5b71b81f5..814b69a057 100644 --- a/src/gpu/effects/GrYUVtoRGBEffect.cpp +++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp @@ -9,7 +9,6 @@ *** This file was autogenerated from GrYUVtoRGBEffect.fp; do not modify. **************************************************************************************************/ #include "GrYUVtoRGBEffect.h" -#if SK_SUPPORT_GPU static const float kJPEGConversionMatrix[16] = { 1.0f, 0.0f, 1.402f, -0.703749f, 1.0f, -0.344136f, -0.714136f, 0.531211f, @@ -170,4 +169,3 @@ GrYUVtoRGBEffect::GrYUVtoRGBEffect(const GrYUVtoRGBEffect& src) std::unique_ptr<GrFragmentProcessor> GrYUVtoRGBEffect::clone() const { return std::unique_ptr<GrFragmentProcessor>(new GrYUVtoRGBEffect(*this)); } -#endif diff --git a/src/gpu/effects/GrYUVtoRGBEffect.h b/src/gpu/effects/GrYUVtoRGBEffect.h index 3fe075f8fb..7008fbe035 100644 --- a/src/gpu/effects/GrYUVtoRGBEffect.h +++ b/src/gpu/effects/GrYUVtoRGBEffect.h @@ -11,7 +11,6 @@ #ifndef GrYUVtoRGBEffect_DEFINED #define GrYUVtoRGBEffect_DEFINED #include "SkTypes.h" -#if SK_SUPPORT_GPU #include "GrFragmentProcessor.h" #include "GrCoordTransform.h" class GrYUVtoRGBEffect : public GrFragmentProcessor { @@ -81,4 +80,3 @@ private: typedef GrFragmentProcessor INHERITED; }; #endif -#endif diff --git a/src/sksl/SkSLCPPCodeGenerator.cpp b/src/sksl/SkSLCPPCodeGenerator.cpp index 7b35ca8f90..7b740a7a71 100644 --- a/src/sksl/SkSLCPPCodeGenerator.cpp +++ b/src/sksl/SkSLCPPCodeGenerator.cpp @@ -766,8 +766,7 @@ bool CPPCodeGenerator::generateCode() { const char* fullName = fFullName.c_str(); this->writef("%s\n", HCodeGenerator::GetHeader(fProgram, fErrors).c_str()); this->writef(kFragmentProcessorHeader, fullName); - this->writef("#include \"%s.h\"\n" - "#if SK_SUPPORT_GPU\n", fullName); + this->writef("#include \"%s.h\"\n", fullName); this->writeSection(CPP_SECTION); this->writef("#include \"glsl/GrGLSLFragmentProcessor.h\"\n" "#include \"glsl/GrGLSLFragmentShaderBuilder.h\"\n" @@ -820,7 +819,7 @@ bool CPPCodeGenerator::generateCode() { this->writeClone(); this->writeTest(); this->writeSection(CPP_END_SECTION); - this->write("#endif\n"); + result &= 0 == fErrors.errorCount(); return result; } diff --git a/src/sksl/SkSLHCodeGenerator.cpp b/src/sksl/SkSLHCodeGenerator.cpp index ad97722077..8984bde8d2 100644 --- a/src/sksl/SkSLHCodeGenerator.cpp +++ b/src/sksl/SkSLHCodeGenerator.cpp @@ -276,8 +276,7 @@ bool HCodeGenerator::generateCode() { "#define %s_DEFINED\n", fFullName.c_str(), fFullName.c_str()); - this->writef("#include \"SkTypes.h\"\n" - "#if SK_SUPPORT_GPU\n"); + this->writef("#include \"SkTypes.h\"\n"); this->writeSection(HEADER_SECTION); this->writef("#include \"GrFragmentProcessor.h\"\n" "#include \"GrCoordTransform.h\"\n"); @@ -317,8 +316,7 @@ bool HCodeGenerator::generateCode() { this->writef(" typedef GrFragmentProcessor INHERITED;\n" "};\n"); this->writeSection(HEADER_END_SECTION); - this->writef("#endif\n" - "#endif\n"); + this->writef("#endif\n"); return 0 == fErrors.errorCount(); } diff --git a/tests/SkSLFPTest.cpp b/tests/SkSLFPTest.cpp index f1a65fcfdb..03b3922ec2 100644 --- a/tests/SkSLFPTest.cpp +++ b/tests/SkSLFPTest.cpp @@ -75,7 +75,6 @@ DEF_TEST(SkSLFPHelloWorld, r) { "#ifndef GrTest_DEFINED\n" "#define GrTest_DEFINED\n" "#include \"SkTypes.h\"\n" - "#if SK_SUPPORT_GPU\n" "#include \"GrFragmentProcessor.h\"\n" "#include \"GrCoordTransform.h\"\n" "class GrTest : public GrFragmentProcessor {\n" @@ -98,7 +97,6 @@ DEF_TEST(SkSLFPHelloWorld, r) { " typedef GrFragmentProcessor INHERITED;\n" "};\n" "#endif\n" - "#endif\n" }, { "/* HEADER */\n" @@ -107,7 +105,6 @@ DEF_TEST(SkSLFPHelloWorld, r) { " *** This file was autogenerated from GrTest.fp; do not modify.\n" " **************************************************************************************************/\n" "#include \"GrTest.h\"\n" - "#if SK_SUPPORT_GPU\n" "#include \"glsl/GrGLSLFragmentProcessor.h\"\n" "#include \"glsl/GrGLSLFragmentShaderBuilder.h\"\n" "#include \"glsl/GrGLSLProgramBuilder.h\"\n" @@ -145,7 +142,6 @@ DEF_TEST(SkSLFPHelloWorld, r) { "std::unique_ptr<GrFragmentProcessor> GrTest::clone() const {\n" " return std::unique_ptr<GrFragmentProcessor>(new GrTest(*this));\n" "}\n" - "#endif\n" }); } @@ -213,7 +209,7 @@ DEF_TEST(SkSLFPSections, r) { "}", *SkSL::ShaderCapsFactory::Default(), { - "#if SK_SUPPORT_GPU\n header section" + "header section" }, {}); test(r, |