Revert "Implement dumpInfo
for .fp files."
This reverts commit a1df23c8b7
.
Reason for revert: Needs c++17 library as written
Original change's description:
> Implement `dumpInfo` for .fp files.
>
> Change-Id: I40f6c1a02e194f090e67a0e3f2d7d83cd2317efd
> Bug: skia:8434
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309139
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
TBR=brianosman@google.com,johnstiles@google.com
Change-Id: I09b98e83735bc30ec8a2e313e4b76a9eb6a7631a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8434
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309656
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
417f3a54fb
commit
9487e9b2a0
@ -49,7 +49,6 @@ skia_core_public = [
|
||||
"$_include/core/SkImageFilter.h",
|
||||
"$_include/core/SkImageGenerator.h",
|
||||
"$_include/core/SkImageInfo.h",
|
||||
"$_include/core/SkM44.h",
|
||||
"$_include/core/SkMallocPixelRef.h",
|
||||
"$_include/core/SkMaskFilter.h",
|
||||
"$_include/core/SkMath.h",
|
||||
|
@ -110,12 +110,6 @@ GrAARectEffect::GrAARectEffect(const GrAARectEffect& src)
|
||||
std::unique_ptr<GrFragmentProcessor> GrAARectEffect::clone() const {
|
||||
return std::make_unique<GrAARectEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrAARectEffect::dumpInfo() const {
|
||||
return SkStringPrintf("AARectEffect(edgeType=%d, rect=float4(%f, %f, %f, %f))", (int)edgeType,
|
||||
rect.left(), rect.top(), rect.right(), rect.bottom());
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrAARectEffect);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrAARectEffect::TestCreate(GrProcessorTestData* d) {
|
||||
|
@ -25,9 +25,6 @@ public:
|
||||
new GrAARectEffect(std::move(inputFP), edgeType, rect));
|
||||
}
|
||||
GrAARectEffect(const GrAARectEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "AARectEffect"; }
|
||||
GrClipEdgeType edgeType;
|
||||
|
@ -96,12 +96,6 @@ GrAlphaThresholdFragmentProcessor::GrAlphaThresholdFragmentProcessor(
|
||||
std::unique_ptr<GrFragmentProcessor> GrAlphaThresholdFragmentProcessor::clone() const {
|
||||
return std::make_unique<GrAlphaThresholdFragmentProcessor>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrAlphaThresholdFragmentProcessor::dumpInfo() const {
|
||||
return SkStringPrintf("AlphaThresholdFragmentProcessor(innerThreshold=%f, outerThreshold=%f)",
|
||||
innerThreshold, outerThreshold);
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrAlphaThresholdFragmentProcessor);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrAlphaThresholdFragmentProcessor::TestCreate(
|
||||
|
@ -26,9 +26,6 @@ public:
|
||||
std::move(inputFP), std::move(maskFP), innerThreshold, outerThreshold));
|
||||
}
|
||||
GrAlphaThresholdFragmentProcessor(const GrAlphaThresholdFragmentProcessor& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "AlphaThresholdFragmentProcessor"; }
|
||||
float innerThreshold;
|
||||
|
@ -81,12 +81,6 @@ GrArithmeticProcessor::GrArithmeticProcessor(const GrArithmeticProcessor& src)
|
||||
std::unique_ptr<GrFragmentProcessor> GrArithmeticProcessor::clone() const {
|
||||
return std::make_unique<GrArithmeticProcessor>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrArithmeticProcessor::dumpInfo() const {
|
||||
return SkStringPrintf("ArithmeticProcessor(k=float4(%f, %f, %f, %f), enforcePMColor=%s)", k.x,
|
||||
k.y, k.z, k.w, (enforcePMColor ? "true" : "false"));
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrArithmeticProcessor);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrArithmeticProcessor::TestCreate(GrProcessorTestData* d) {
|
||||
|
@ -29,9 +29,6 @@ public:
|
||||
inputs.fEnforcePMColor));
|
||||
}
|
||||
GrArithmeticProcessor(const GrArithmeticProcessor& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "ArithmeticProcessor"; }
|
||||
SkV4 k;
|
||||
|
@ -70,8 +70,3 @@ GrBlurredEdgeFragmentProcessor::GrBlurredEdgeFragmentProcessor(
|
||||
std::unique_ptr<GrFragmentProcessor> GrBlurredEdgeFragmentProcessor::clone() const {
|
||||
return std::make_unique<GrBlurredEdgeFragmentProcessor>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrBlurredEdgeFragmentProcessor::dumpInfo() const {
|
||||
return SkStringPrintf("BlurredEdgeFragmentProcessor(mode=%d)", (int)mode);
|
||||
}
|
||||
#endif
|
||||
|
@ -25,9 +25,6 @@ public:
|
||||
new GrBlurredEdgeFragmentProcessor(std::move(inputFP), mode));
|
||||
}
|
||||
GrBlurredEdgeFragmentProcessor(const GrBlurredEdgeFragmentProcessor& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "BlurredEdgeFragmentProcessor"; }
|
||||
Mode mode;
|
||||
|
@ -360,15 +360,6 @@ GrCircleBlurFragmentProcessor::GrCircleBlurFragmentProcessor(
|
||||
std::unique_ptr<GrFragmentProcessor> GrCircleBlurFragmentProcessor::clone() const {
|
||||
return std::make_unique<GrCircleBlurFragmentProcessor>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrCircleBlurFragmentProcessor::dumpInfo() const {
|
||||
return SkStringPrintf(
|
||||
"CircleBlurFragmentProcessor(circleRect=half4(%f, %f, %f, %f), solidRadius=%f, "
|
||||
"textureRadius=%f)",
|
||||
circleRect.left(), circleRect.top(), circleRect.right(), circleRect.bottom(),
|
||||
solidRadius, textureRadius);
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrCircleBlurFragmentProcessor);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrCircleBlurFragmentProcessor::TestCreate(
|
||||
|
@ -25,9 +25,6 @@ public:
|
||||
const SkRect& circle,
|
||||
float sigma);
|
||||
GrCircleBlurFragmentProcessor(const GrCircleBlurFragmentProcessor& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "CircleBlurFragmentProcessor"; }
|
||||
SkRect circleRect;
|
||||
|
@ -121,12 +121,6 @@ GrCircleEffect::GrCircleEffect(const GrCircleEffect& src)
|
||||
std::unique_ptr<GrFragmentProcessor> GrCircleEffect::clone() const {
|
||||
return std::make_unique<GrCircleEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrCircleEffect::dumpInfo() const {
|
||||
return SkStringPrintf("CircleEffect(edgeType=%d, center=float2(%f, %f), radius=%f)",
|
||||
(int)edgeType, center.fX, center.fY, radius);
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrCircleEffect);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrCircleEffect::TestCreate(GrProcessorTestData* testData) {
|
||||
|
@ -31,9 +31,6 @@ public:
|
||||
new GrCircleEffect(std::move(inputFP), edgeType, center, radius)));
|
||||
}
|
||||
GrCircleEffect(const GrCircleEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "CircleEffect"; }
|
||||
GrClipEdgeType edgeType;
|
||||
|
@ -65,12 +65,6 @@ GrClampFragmentProcessor::GrClampFragmentProcessor(const GrClampFragmentProcesso
|
||||
std::unique_ptr<GrFragmentProcessor> GrClampFragmentProcessor::clone() const {
|
||||
return std::make_unique<GrClampFragmentProcessor>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrClampFragmentProcessor::dumpInfo() const {
|
||||
return SkStringPrintf("ClampFragmentProcessor(clampToPremul=%s)",
|
||||
(clampToPremul ? "true" : "false"));
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrClampFragmentProcessor);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrClampFragmentProcessor::TestCreate(GrProcessorTestData* d) {
|
||||
|
@ -31,9 +31,6 @@ public:
|
||||
new GrClampFragmentProcessor(std::move(inputFP), clampToPremul));
|
||||
}
|
||||
GrClampFragmentProcessor(const GrClampFragmentProcessor& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "ClampFragmentProcessor"; }
|
||||
bool clampToPremul;
|
||||
|
@ -123,18 +123,6 @@ GrColorMatrixFragmentProcessor::GrColorMatrixFragmentProcessor(
|
||||
std::unique_ptr<GrFragmentProcessor> GrColorMatrixFragmentProcessor::clone() const {
|
||||
return std::make_unique<GrColorMatrixFragmentProcessor>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrColorMatrixFragmentProcessor::dumpInfo() const {
|
||||
return SkStringPrintf(
|
||||
"ColorMatrixFragmentProcessor(m=half4x4(%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, "
|
||||
"%f, %f, %f, %f, %f), v=half4(%f, %f, %f, %f), unpremulInput=%s, clampRGBOutput=%s, "
|
||||
"premulOutput=%s)",
|
||||
m.rc(0, 0), m.rc(1, 0), m.rc(2, 0), m.rc(3, 0), m.rc(0, 1), m.rc(1, 1), m.rc(2, 1),
|
||||
m.rc(3, 1), m.rc(0, 2), m.rc(1, 2), m.rc(2, 2), m.rc(3, 2), m.rc(0, 3), m.rc(1, 3),
|
||||
m.rc(2, 3), m.rc(3, 3), v.x, v.y, v.z, v.w, (unpremulInput ? "true" : "false"),
|
||||
(clampRGBOutput ? "true" : "false"), (premulOutput ? "true" : "false"));
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrColorMatrixFragmentProcessor);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrColorMatrixFragmentProcessor::TestCreate(
|
||||
|
@ -57,9 +57,6 @@ public:
|
||||
std::move(inputFP), m44, v4, unpremulInput, clampRGBOutput, premulOutput));
|
||||
}
|
||||
GrColorMatrixFragmentProcessor(const GrColorMatrixFragmentProcessor& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "ColorMatrixFragmentProcessor"; }
|
||||
SkM44 m;
|
||||
|
@ -63,8 +63,3 @@ GrComposeLerpEffect::GrComposeLerpEffect(const GrComposeLerpEffect& src)
|
||||
std::unique_ptr<GrFragmentProcessor> GrComposeLerpEffect::clone() const {
|
||||
return std::make_unique<GrComposeLerpEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrComposeLerpEffect::dumpInfo() const {
|
||||
return SkStringPrintf("ComposeLerpEffect(weight=%f)", weight);
|
||||
}
|
||||
#endif
|
||||
|
@ -25,9 +25,6 @@ public:
|
||||
new GrComposeLerpEffect(std::move(child1), std::move(child2), weight));
|
||||
}
|
||||
GrComposeLerpEffect(const GrComposeLerpEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "ComposeLerpEffect"; }
|
||||
float weight;
|
||||
|
@ -70,11 +70,6 @@ GrConfigConversionEffect::GrConfigConversionEffect(const GrConfigConversionEffec
|
||||
std::unique_ptr<GrFragmentProcessor> GrConfigConversionEffect::clone() const {
|
||||
return std::make_unique<GrConfigConversionEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrConfigConversionEffect::dumpInfo() const {
|
||||
return SkStringPrintf("ConfigConversionEffect(pmConversion=%d)", (int)pmConversion);
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConfigConversionEffect);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrConfigConversionEffect::TestCreate(
|
||||
|
@ -35,9 +35,6 @@ public:
|
||||
new GrConfigConversionEffect(std::move(fp), pmConversion));
|
||||
}
|
||||
GrConfigConversionEffect(const GrConfigConversionEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "ConfigConversionEffect"; }
|
||||
PMConversion pmConversion;
|
||||
|
@ -67,12 +67,6 @@ GrConstColorProcessor::GrConstColorProcessor(const GrConstColorProcessor& src)
|
||||
std::unique_ptr<GrFragmentProcessor> GrConstColorProcessor::clone() const {
|
||||
return std::make_unique<GrConstColorProcessor>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrConstColorProcessor::dumpInfo() const {
|
||||
return SkStringPrintf("ConstColorProcessor(color=half4(%f, %f, %f, %f))", color.fR, color.fG,
|
||||
color.fB, color.fA);
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConstColorProcessor);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrConstColorProcessor::TestCreate(GrProcessorTestData* d) {
|
||||
|
@ -25,9 +25,6 @@ public:
|
||||
return std::unique_ptr<GrFragmentProcessor>(new GrConstColorProcessor(color));
|
||||
}
|
||||
GrConstColorProcessor(const GrConstColorProcessor& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "ConstColorProcessor"; }
|
||||
SkPMColor4f color;
|
||||
|
@ -53,9 +53,6 @@ GrDeviceSpaceEffect::GrDeviceSpaceEffect(const GrDeviceSpaceEffect& src)
|
||||
std::unique_ptr<GrFragmentProcessor> GrDeviceSpaceEffect::clone() const {
|
||||
return std::make_unique<GrDeviceSpaceEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrDeviceSpaceEffect::dumpInfo() const { return SkStringPrintf("DeviceSpaceEffect"); }
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrDeviceSpaceEffect);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrDeviceSpaceEffect::TestCreate(GrProcessorTestData* d) {
|
||||
|
@ -26,9 +26,6 @@ public:
|
||||
return std::unique_ptr<GrFragmentProcessor>(new GrDeviceSpaceEffect(std::move(fp)));
|
||||
}
|
||||
GrDeviceSpaceEffect(const GrDeviceSpaceEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "DeviceSpaceEffect"; }
|
||||
|
||||
|
@ -75,11 +75,6 @@ GrDitherEffect::GrDitherEffect(const GrDitherEffect& src)
|
||||
std::unique_ptr<GrFragmentProcessor> GrDitherEffect::clone() const {
|
||||
return std::make_unique<GrDitherEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrDitherEffect::dumpInfo() const {
|
||||
return SkStringPrintf("DitherEffect(range=%f)", range);
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrDitherEffect);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrDitherEffect::TestCreate(GrProcessorTestData* d) {
|
||||
|
@ -26,9 +26,6 @@ public:
|
||||
return std::unique_ptr<GrFragmentProcessor>(new GrDitherEffect(std::move(inputFP), range));
|
||||
}
|
||||
GrDitherEffect(const GrDitherEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "DitherEffect"; }
|
||||
float range;
|
||||
|
@ -161,12 +161,6 @@ GrEllipseEffect::GrEllipseEffect(const GrEllipseEffect& src)
|
||||
std::unique_ptr<GrFragmentProcessor> GrEllipseEffect::clone() const {
|
||||
return std::make_unique<GrEllipseEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrEllipseEffect::dumpInfo() const {
|
||||
return SkStringPrintf("EllipseEffect(edgeType=%d, center=float2(%f, %f), radii=float2(%f, %f))",
|
||||
(int)edgeType, center.fX, center.fY, radii.fX, radii.fY);
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrEllipseEffect);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrEllipseEffect::TestCreate(GrProcessorTestData* testData) {
|
||||
|
@ -41,9 +41,6 @@ public:
|
||||
new GrEllipseEffect(std::move(inputFP), edgeType, center, radii)));
|
||||
}
|
||||
GrEllipseEffect(const GrEllipseEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "EllipseEffect"; }
|
||||
GrClipEdgeType edgeType;
|
||||
|
@ -59,6 +59,3 @@ GrHSLToRGBFilterEffect::GrHSLToRGBFilterEffect(const GrHSLToRGBFilterEffect& src
|
||||
std::unique_ptr<GrFragmentProcessor> GrHSLToRGBFilterEffect::clone() const {
|
||||
return std::make_unique<GrHSLToRGBFilterEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrHSLToRGBFilterEffect::dumpInfo() const { return SkStringPrintf("HSLToRGBFilterEffect"); }
|
||||
#endif
|
||||
|
@ -36,9 +36,6 @@ public:
|
||||
return std::unique_ptr<GrFragmentProcessor>(new GrHSLToRGBFilterEffect(std::move(inputFP)));
|
||||
}
|
||||
GrHSLToRGBFilterEffect(const GrHSLToRGBFilterEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "HSLToRGBFilterEffect"; }
|
||||
|
||||
|
@ -163,16 +163,6 @@ GrHighContrastFilterEffect::GrHighContrastFilterEffect(const GrHighContrastFilte
|
||||
std::unique_ptr<GrFragmentProcessor> GrHighContrastFilterEffect::clone() const {
|
||||
return std::make_unique<GrHighContrastFilterEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrHighContrastFilterEffect::dumpInfo() const {
|
||||
return SkStringPrintf(
|
||||
"HighContrastFilterEffect(contrastMod=%f, hasContrast=%s, grayscale=%s, "
|
||||
"invertBrightness=%s, invertLightness=%s, linearize=%s)",
|
||||
contrastMod, (hasContrast ? "true" : "false"), (grayscale ? "true" : "false"),
|
||||
(invertBrightness ? "true" : "false"), (invertLightness ? "true" : "false"),
|
||||
(linearize ? "true" : "false"));
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrHighContrastFilterEffect);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrHighContrastFilterEffect::TestCreate(
|
||||
|
@ -35,9 +35,6 @@ public:
|
||||
linearize));
|
||||
}
|
||||
GrHighContrastFilterEffect(const GrHighContrastFilterEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "HighContrastFilterEffect"; }
|
||||
float contrastMod;
|
||||
|
@ -55,8 +55,3 @@ GrLumaColorFilterEffect::GrLumaColorFilterEffect(const GrLumaColorFilterEffect&
|
||||
std::unique_ptr<GrFragmentProcessor> GrLumaColorFilterEffect::clone() const {
|
||||
return std::make_unique<GrLumaColorFilterEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrLumaColorFilterEffect::dumpInfo() const {
|
||||
return SkStringPrintf("LumaColorFilterEffect");
|
||||
}
|
||||
#endif
|
||||
|
@ -31,9 +31,6 @@ public:
|
||||
new GrLumaColorFilterEffect(std::move(inputFP)));
|
||||
}
|
||||
GrLumaColorFilterEffect(const GrLumaColorFilterEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "LumaColorFilterEffect"; }
|
||||
|
||||
|
@ -147,16 +147,6 @@ GrMagnifierEffect::GrMagnifierEffect(const GrMagnifierEffect& src)
|
||||
std::unique_ptr<GrFragmentProcessor> GrMagnifierEffect::clone() const {
|
||||
return std::make_unique<GrMagnifierEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrMagnifierEffect::dumpInfo() const {
|
||||
return SkStringPrintf(
|
||||
"MagnifierEffect(bounds=int4(%d, %d, %d, %d), srcRect=float4(%f, %f, %f, %f), "
|
||||
"xInvZoom=%f, yInvZoom=%f, xInvInset=%f, yInvInset=%f)",
|
||||
bounds.left(), bounds.top(), bounds.right(), bounds.bottom(), srcRect.left(),
|
||||
srcRect.top(), srcRect.right(), srcRect.bottom(), xInvZoom, yInvZoom, xInvInset,
|
||||
yInvInset);
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMagnifierEffect);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrMagnifierEffect::TestCreate(GrProcessorTestData* d) {
|
||||
|
@ -29,9 +29,6 @@ public:
|
||||
std::move(src), bounds, srcRect, xInvZoom, yInvZoom, xInvInset, yInvInset));
|
||||
}
|
||||
GrMagnifierEffect(const GrMagnifierEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "MagnifierEffect"; }
|
||||
SkIRect bounds;
|
||||
|
@ -69,8 +69,3 @@ GrMixerEffect::GrMixerEffect(const GrMixerEffect& src)
|
||||
std::unique_ptr<GrFragmentProcessor> GrMixerEffect::clone() const {
|
||||
return std::make_unique<GrMixerEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrMixerEffect::dumpInfo() const {
|
||||
return SkStringPrintf("MixerEffect(weight=%f)", weight);
|
||||
}
|
||||
#endif
|
||||
|
@ -33,9 +33,6 @@ public:
|
||||
new GrMixerEffect(std::move(inputFP), std::move(fp0), std::move(fp1), weight));
|
||||
}
|
||||
GrMixerEffect(const GrMixerEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "MixerEffect"; }
|
||||
float weight;
|
||||
|
@ -103,12 +103,3 @@ GrOverrideInputFragmentProcessor::GrOverrideInputFragmentProcessor(
|
||||
std::unique_ptr<GrFragmentProcessor> GrOverrideInputFragmentProcessor::clone() const {
|
||||
return std::make_unique<GrOverrideInputFragmentProcessor>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrOverrideInputFragmentProcessor::dumpInfo() const {
|
||||
return SkStringPrintf(
|
||||
"OverrideInputFragmentProcessor(useUniform=%s, uniformColor=half4(%f, %f, %f, %f), "
|
||||
"literalColor=half4(%f, %f, %f, %f))",
|
||||
(useUniform ? "true" : "false"), uniformColor.fR, uniformColor.fG, uniformColor.fB,
|
||||
uniformColor.fA, literalColor.fR, literalColor.fG, literalColor.fB, literalColor.fA);
|
||||
}
|
||||
#endif
|
||||
|
@ -42,9 +42,6 @@ public:
|
||||
new GrOverrideInputFragmentProcessor(std::move(fp), useUniform, color, color));
|
||||
}
|
||||
GrOverrideInputFragmentProcessor(const GrOverrideInputFragmentProcessor& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "OverrideInputFragmentProcessor"; }
|
||||
bool useUniform;
|
||||
|
@ -62,6 +62,3 @@ GrRGBToHSLFilterEffect::GrRGBToHSLFilterEffect(const GrRGBToHSLFilterEffect& src
|
||||
std::unique_ptr<GrFragmentProcessor> GrRGBToHSLFilterEffect::clone() const {
|
||||
return std::make_unique<GrRGBToHSLFilterEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrRGBToHSLFilterEffect::dumpInfo() const { return SkStringPrintf("RGBToHSLFilterEffect"); }
|
||||
#endif
|
||||
|
@ -38,9 +38,6 @@ public:
|
||||
return std::unique_ptr<GrFragmentProcessor>(new GrRGBToHSLFilterEffect(std::move(inputFP)));
|
||||
}
|
||||
GrRGBToHSLFilterEffect(const GrRGBToHSLFilterEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "RGBToHSLFilterEffect"; }
|
||||
|
||||
|
@ -159,13 +159,6 @@ GrRRectBlurEffect::GrRRectBlurEffect(const GrRRectBlurEffect& src)
|
||||
std::unique_ptr<GrFragmentProcessor> GrRRectBlurEffect::clone() const {
|
||||
return std::make_unique<GrRRectBlurEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrRRectBlurEffect::dumpInfo() const {
|
||||
return SkStringPrintf("RRectBlurEffect(sigma=%f, rect=float4(%f, %f, %f, %f), cornerRadius=%f)",
|
||||
sigma, rect.left(), rect.top(), rect.right(), rect.bottom(),
|
||||
cornerRadius);
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrRRectBlurEffect);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrRRectBlurEffect::TestCreate(GrProcessorTestData* d) {
|
||||
|
@ -115,9 +115,6 @@ public:
|
||||
const SkRRect& srcRRect,
|
||||
const SkRRect& devRRect);
|
||||
GrRRectBlurEffect(const GrRRectBlurEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "RRectBlurEffect"; }
|
||||
float sigma;
|
||||
|
@ -152,12 +152,6 @@ GrRectBlurEffect::GrRectBlurEffect(const GrRectBlurEffect& src)
|
||||
std::unique_ptr<GrFragmentProcessor> GrRectBlurEffect::clone() const {
|
||||
return std::make_unique<GrRectBlurEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrRectBlurEffect::dumpInfo() const {
|
||||
return SkStringPrintf("RectBlurEffect(rect=float4(%f, %f, %f, %f), isFast=%s)", rect.left(),
|
||||
rect.top(), rect.right(), rect.bottom(), (isFast ? "true" : "false"));
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrRectBlurEffect);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrRectBlurEffect::TestCreate(GrProcessorTestData* data) {
|
||||
|
@ -123,9 +123,6 @@ public:
|
||||
GrSamplerState::Filter::kLinear));
|
||||
}
|
||||
GrRectBlurEffect(const GrRectBlurEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "RectBlurEffect"; }
|
||||
SkRect rect;
|
||||
|
@ -114,13 +114,3 @@ GrClampedGradientEffect::GrClampedGradientEffect(const GrClampedGradientEffect&
|
||||
std::unique_ptr<GrFragmentProcessor> GrClampedGradientEffect::clone() const {
|
||||
return std::make_unique<GrClampedGradientEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrClampedGradientEffect::dumpInfo() const {
|
||||
return SkStringPrintf(
|
||||
"ClampedGradientEffect(leftBorderColor=half4(%f, %f, %f, %f), "
|
||||
"rightBorderColor=half4(%f, %f, %f, %f), makePremul=%s, colorsAreOpaque=%s)",
|
||||
leftBorderColor.fR, leftBorderColor.fG, leftBorderColor.fB, leftBorderColor.fA,
|
||||
rightBorderColor.fR, rightBorderColor.fG, rightBorderColor.fB, rightBorderColor.fA,
|
||||
(makePremul ? "true" : "false"), (colorsAreOpaque ? "true" : "false"));
|
||||
}
|
||||
#endif
|
||||
|
@ -30,9 +30,6 @@ public:
|
||||
makePremul, colorsAreOpaque));
|
||||
}
|
||||
GrClampedGradientEffect(const GrClampedGradientEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "ClampedGradientEffect"; }
|
||||
SkPMColor4f leftBorderColor;
|
||||
|
@ -137,16 +137,6 @@ GrDualIntervalGradientColorizer::GrDualIntervalGradientColorizer(
|
||||
std::unique_ptr<GrFragmentProcessor> GrDualIntervalGradientColorizer::clone() const {
|
||||
return std::make_unique<GrDualIntervalGradientColorizer>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrDualIntervalGradientColorizer::dumpInfo() const {
|
||||
return SkStringPrintf(
|
||||
"DualIntervalGradientColorizer(scale01=float4(%f, %f, %f, %f), bias01=float4(%f, %f, "
|
||||
"%f, %f), scale23=float4(%f, %f, %f, %f), bias23=float4(%f, %f, %f, %f), threshold=%f)",
|
||||
scale01.fR, scale01.fG, scale01.fB, scale01.fA, bias01.fR, bias01.fG, bias01.fB,
|
||||
bias01.fA, scale23.fR, scale23.fG, scale23.fB, scale23.fA, bias23.fR, bias23.fG,
|
||||
bias23.fB, bias23.fA, threshold);
|
||||
}
|
||||
#endif
|
||||
|
||||
std::unique_ptr<GrFragmentProcessor> GrDualIntervalGradientColorizer::Make(const SkPMColor4f& c0,
|
||||
const SkPMColor4f& c1,
|
||||
|
@ -24,9 +24,6 @@ public:
|
||||
const SkPMColor4f& c3,
|
||||
float threshold);
|
||||
GrDualIntervalGradientColorizer(const GrDualIntervalGradientColorizer& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "DualIntervalGradientColorizer"; }
|
||||
SkPMColor4f scale01;
|
||||
|
@ -53,9 +53,6 @@ GrLinearGradientLayout::GrLinearGradientLayout(const GrLinearGradientLayout& src
|
||||
std::unique_ptr<GrFragmentProcessor> GrLinearGradientLayout::clone() const {
|
||||
return std::make_unique<GrLinearGradientLayout>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrLinearGradientLayout::dumpInfo() const { return SkStringPrintf("LinearGradientLayout"); }
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrLinearGradientLayout);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrLinearGradientLayout::TestCreate(GrProcessorTestData* d) {
|
||||
|
@ -25,9 +25,6 @@ public:
|
||||
static std::unique_ptr<GrFragmentProcessor> Make(const SkLinearGradient& gradient,
|
||||
const GrFPArgs& args);
|
||||
GrLinearGradientLayout(const GrLinearGradientLayout& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "LinearGradientLayout"; }
|
||||
|
||||
|
@ -53,9 +53,6 @@ GrRadialGradientLayout::GrRadialGradientLayout(const GrRadialGradientLayout& src
|
||||
std::unique_ptr<GrFragmentProcessor> GrRadialGradientLayout::clone() const {
|
||||
return std::make_unique<GrRadialGradientLayout>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrRadialGradientLayout::dumpInfo() const { return SkStringPrintf("RadialGradientLayout"); }
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrRadialGradientLayout);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrRadialGradientLayout::TestCreate(GrProcessorTestData* d) {
|
||||
|
@ -25,9 +25,6 @@ public:
|
||||
static std::unique_ptr<GrFragmentProcessor> Make(const SkRadialGradient& gradient,
|
||||
const GrFPArgs& args);
|
||||
GrRadialGradientLayout(const GrRadialGradientLayout& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "RadialGradientLayout"; }
|
||||
|
||||
|
@ -88,11 +88,3 @@ GrSingleIntervalGradientColorizer::GrSingleIntervalGradientColorizer(
|
||||
std::unique_ptr<GrFragmentProcessor> GrSingleIntervalGradientColorizer::clone() const {
|
||||
return std::make_unique<GrSingleIntervalGradientColorizer>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrSingleIntervalGradientColorizer::dumpInfo() const {
|
||||
return SkStringPrintf(
|
||||
"SingleIntervalGradientColorizer(start=half4(%f, %f, %f, %f), end=half4(%f, %f, %f, "
|
||||
"%f))",
|
||||
start.fR, start.fG, start.fB, start.fA, end.fR, end.fG, end.fB, end.fA);
|
||||
}
|
||||
#endif
|
||||
|
@ -23,9 +23,6 @@ public:
|
||||
new GrSingleIntervalGradientColorizer(start, end));
|
||||
}
|
||||
GrSingleIntervalGradientColorizer(const GrSingleIntervalGradientColorizer& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "SingleIntervalGradientColorizer"; }
|
||||
SkPMColor4f start;
|
||||
|
@ -91,11 +91,6 @@ GrSweepGradientLayout::GrSweepGradientLayout(const GrSweepGradientLayout& src)
|
||||
std::unique_ptr<GrFragmentProcessor> GrSweepGradientLayout::clone() const {
|
||||
return std::make_unique<GrSweepGradientLayout>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrSweepGradientLayout::dumpInfo() const {
|
||||
return SkStringPrintf("SweepGradientLayout(bias=%f, scale=%f)", bias, scale);
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSweepGradientLayout);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrSweepGradientLayout::TestCreate(GrProcessorTestData* d) {
|
||||
|
@ -25,9 +25,6 @@ public:
|
||||
static std::unique_ptr<GrFragmentProcessor> Make(const SkSweepGradient& gradient,
|
||||
const GrFPArgs& args);
|
||||
GrSweepGradientLayout(const GrSweepGradientLayout& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "SweepGradientLayout"; }
|
||||
float bias;
|
||||
|
@ -93,10 +93,3 @@ GrTiledGradientEffect::GrTiledGradientEffect(const GrTiledGradientEffect& src)
|
||||
std::unique_ptr<GrFragmentProcessor> GrTiledGradientEffect::clone() const {
|
||||
return std::make_unique<GrTiledGradientEffect>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrTiledGradientEffect::dumpInfo() const {
|
||||
return SkStringPrintf("TiledGradientEffect(mirror=%s, makePremul=%s, colorsAreOpaque=%s)",
|
||||
(mirror ? "true" : "false"), (makePremul ? "true" : "false"),
|
||||
(colorsAreOpaque ? "true" : "false"));
|
||||
}
|
||||
#endif
|
||||
|
@ -28,9 +28,6 @@ public:
|
||||
std::move(colorizer), std::move(gradLayout), mirror, makePremul, colorsAreOpaque));
|
||||
}
|
||||
GrTiledGradientEffect(const GrTiledGradientEffect& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "TiledGradientEffect"; }
|
||||
bool mirror;
|
||||
|
@ -185,17 +185,6 @@ GrTwoPointConicalGradientLayout::GrTwoPointConicalGradientLayout(
|
||||
std::unique_ptr<GrFragmentProcessor> GrTwoPointConicalGradientLayout::clone() const {
|
||||
return std::make_unique<GrTwoPointConicalGradientLayout>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrTwoPointConicalGradientLayout::dumpInfo() const {
|
||||
return SkStringPrintf(
|
||||
"TwoPointConicalGradientLayout(type=%d, isRadiusIncreasing=%s, isFocalOnCircle=%s, "
|
||||
"isWellBehaved=%s, isSwapped=%s, isNativelyFocal=%s, focalParams=half2(%f, %f))",
|
||||
(int)type, (isRadiusIncreasing ? "true" : "false"),
|
||||
(isFocalOnCircle ? "true" : "false"), (isWellBehaved ? "true" : "false"),
|
||||
(isSwapped ? "true" : "false"), (isNativelyFocal ? "true" : "false"), focalParams.fX,
|
||||
focalParams.fY);
|
||||
}
|
||||
#endif
|
||||
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrTwoPointConicalGradientLayout);
|
||||
#if GR_TEST_UTILS
|
||||
std::unique_ptr<GrFragmentProcessor> GrTwoPointConicalGradientLayout::TestCreate(
|
||||
|
@ -27,9 +27,6 @@ public:
|
||||
static std::unique_ptr<GrFragmentProcessor> Make(const SkTwoPointConicalGradient& gradient,
|
||||
const GrFPArgs& args);
|
||||
GrTwoPointConicalGradientLayout(const GrTwoPointConicalGradientLayout& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "TwoPointConicalGradientLayout"; }
|
||||
Type type;
|
||||
|
@ -344,34 +344,6 @@ GrUnrolledBinaryGradientColorizer::GrUnrolledBinaryGradientColorizer(
|
||||
std::unique_ptr<GrFragmentProcessor> GrUnrolledBinaryGradientColorizer::clone() const {
|
||||
return std::make_unique<GrUnrolledBinaryGradientColorizer>(*this);
|
||||
}
|
||||
#ifdef SK_DEBUG
|
||||
SkString GrUnrolledBinaryGradientColorizer::dumpInfo() const {
|
||||
return SkStringPrintf(
|
||||
"UnrolledBinaryGradientColorizer(intervalCount=%d, scale0_1=float4(%f, %f, %f, %f), "
|
||||
"scale2_3=float4(%f, %f, %f, %f), scale4_5=float4(%f, %f, %f, %f), scale6_7=float4(%f, "
|
||||
"%f, %f, %f), scale8_9=float4(%f, %f, %f, %f), scale10_11=float4(%f, %f, %f, %f), "
|
||||
"scale12_13=float4(%f, %f, %f, %f), scale14_15=float4(%f, %f, %f, %f), "
|
||||
"bias0_1=float4(%f, %f, %f, %f), bias2_3=float4(%f, %f, %f, %f), bias4_5=float4(%f, "
|
||||
"%f, %f, %f), bias6_7=float4(%f, %f, %f, %f), bias8_9=float4(%f, %f, %f, %f), "
|
||||
"bias10_11=float4(%f, %f, %f, %f), bias12_13=float4(%f, %f, %f, %f), "
|
||||
"bias14_15=float4(%f, %f, %f, %f), thresholds1_7=half4(%f, %f, %f, %f), "
|
||||
"thresholds9_13=half4(%f, %f, %f, %f))",
|
||||
intervalCount, scale0_1.fR, scale0_1.fG, scale0_1.fB, scale0_1.fA, scale2_3.fR,
|
||||
scale2_3.fG, scale2_3.fB, scale2_3.fA, scale4_5.fR, scale4_5.fG, scale4_5.fB,
|
||||
scale4_5.fA, scale6_7.fR, scale6_7.fG, scale6_7.fB, scale6_7.fA, scale8_9.fR,
|
||||
scale8_9.fG, scale8_9.fB, scale8_9.fA, scale10_11.fR, scale10_11.fG, scale10_11.fB,
|
||||
scale10_11.fA, scale12_13.fR, scale12_13.fG, scale12_13.fB, scale12_13.fA,
|
||||
scale14_15.fR, scale14_15.fG, scale14_15.fB, scale14_15.fA, bias0_1.fR, bias0_1.fG,
|
||||
bias0_1.fB, bias0_1.fA, bias2_3.fR, bias2_3.fG, bias2_3.fB, bias2_3.fA, bias4_5.fR,
|
||||
bias4_5.fG, bias4_5.fB, bias4_5.fA, bias6_7.fR, bias6_7.fG, bias6_7.fB, bias6_7.fA,
|
||||
bias8_9.fR, bias8_9.fG, bias8_9.fB, bias8_9.fA, bias10_11.fR, bias10_11.fG,
|
||||
bias10_11.fB, bias10_11.fA, bias12_13.fR, bias12_13.fG, bias12_13.fB, bias12_13.fA,
|
||||
bias14_15.fR, bias14_15.fG, bias14_15.fB, bias14_15.fA, thresholds1_7.left(),
|
||||
thresholds1_7.top(), thresholds1_7.right(), thresholds1_7.bottom(),
|
||||
thresholds9_13.left(), thresholds9_13.top(), thresholds9_13.right(),
|
||||
thresholds9_13.bottom());
|
||||
}
|
||||
#endif
|
||||
|
||||
static const int kMaxIntervals = 8;
|
||||
std::unique_ptr<GrFragmentProcessor> GrUnrolledBinaryGradientColorizer::Make(
|
||||
|
@ -24,9 +24,6 @@ public:
|
||||
const SkScalar* positions,
|
||||
int count);
|
||||
GrUnrolledBinaryGradientColorizer(const GrUnrolledBinaryGradientColorizer& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "UnrolledBinaryGradientColorizer"; }
|
||||
int32_t intervalCount;
|
||||
|
@ -109,7 +109,6 @@ Within an '.fp' fragment processor file:
|
||||
@fields (extra private fields, each terminated with a semicolon)
|
||||
@make (replaces the default Make function)
|
||||
@clone (replaces the default clone() function)
|
||||
@dumpInfo (replaces the default dumpInfo() function)
|
||||
@setData(<pdman>) (extra code for the setData function, where <pdman> is
|
||||
the name of the GrGLSLProgramDataManager)
|
||||
@test(<testData>) (the body of the TestCreate function, where <testData> is
|
||||
|
@ -164,104 +164,67 @@ static bool is_uniform_in(const Variable& var) {
|
||||
var.fType.kind() != Type::kSampler_Kind;
|
||||
}
|
||||
|
||||
String CPPCodeGenerator::formatRuntimeValue(const Type& type,
|
||||
const Layout& layout,
|
||||
const String& cppCode,
|
||||
std::vector<String>* formatArgs) {
|
||||
void CPPCodeGenerator::writeRuntimeValue(const Type& type, const Layout& layout,
|
||||
const String& cppCode) {
|
||||
if (type.isFloat()) {
|
||||
formatArgs->push_back(cppCode);
|
||||
return "%f";
|
||||
}
|
||||
if (type == *fContext.fInt_Type) {
|
||||
formatArgs->push_back(cppCode);
|
||||
return "%d";
|
||||
}
|
||||
if (type == *fContext.fBool_Type) {
|
||||
formatArgs->push_back("(" + cppCode + " ? \"true\" : \"false\")");
|
||||
return "%s";
|
||||
}
|
||||
if (type == *fContext.fFloat2_Type || type == *fContext.fHalf2_Type) {
|
||||
formatArgs->push_back(cppCode + ".fX");
|
||||
formatArgs->push_back(cppCode + ".fY");
|
||||
return type.name() + "(%f, %f)";
|
||||
}
|
||||
if (type == *fContext.fFloat3_Type || type == *fContext.fHalf3_Type) {
|
||||
formatArgs->push_back(cppCode + ".fX");
|
||||
formatArgs->push_back(cppCode + ".fY");
|
||||
formatArgs->push_back(cppCode + ".fZ");
|
||||
return type.name() + "(%f, %f, %f)";
|
||||
}
|
||||
if (type == *fContext.fFloat4_Type || type == *fContext.fHalf4_Type) {
|
||||
this->write("%f");
|
||||
fFormatArgs.push_back(cppCode);
|
||||
} else if (type == *fContext.fInt_Type) {
|
||||
this->write("%d");
|
||||
fFormatArgs.push_back(cppCode);
|
||||
} else if (type == *fContext.fBool_Type) {
|
||||
this->write("%s");
|
||||
fFormatArgs.push_back("(" + cppCode + " ? \"true\" : \"false\")");
|
||||
} else if (type == *fContext.fFloat2_Type || type == *fContext.fHalf2_Type) {
|
||||
this->write(type.name() + "(%f, %f)");
|
||||
fFormatArgs.push_back(cppCode + ".fX");
|
||||
fFormatArgs.push_back(cppCode + ".fY");
|
||||
} else if (type == *fContext.fFloat4_Type || type == *fContext.fHalf4_Type) {
|
||||
this->write(type.name() + "(%f, %f, %f, %f)");
|
||||
switch (layout.fCType) {
|
||||
case Layout::CType::kSkPMColor:
|
||||
formatArgs->push_back("SkGetPackedR32(" + cppCode + ") / 255.0");
|
||||
formatArgs->push_back("SkGetPackedG32(" + cppCode + ") / 255.0");
|
||||
formatArgs->push_back("SkGetPackedB32(" + cppCode + ") / 255.0");
|
||||
formatArgs->push_back("SkGetPackedA32(" + cppCode + ") / 255.0");
|
||||
fFormatArgs.push_back("SkGetPackedR32(" + cppCode + ") / 255.0");
|
||||
fFormatArgs.push_back("SkGetPackedG32(" + cppCode + ") / 255.0");
|
||||
fFormatArgs.push_back("SkGetPackedB32(" + cppCode + ") / 255.0");
|
||||
fFormatArgs.push_back("SkGetPackedA32(" + cppCode + ") / 255.0");
|
||||
break;
|
||||
case Layout::CType::kSkPMColor4f:
|
||||
formatArgs->push_back(cppCode + ".fR");
|
||||
formatArgs->push_back(cppCode + ".fG");
|
||||
formatArgs->push_back(cppCode + ".fB");
|
||||
formatArgs->push_back(cppCode + ".fA");
|
||||
fFormatArgs.push_back(cppCode + ".fR");
|
||||
fFormatArgs.push_back(cppCode + ".fG");
|
||||
fFormatArgs.push_back(cppCode + ".fB");
|
||||
fFormatArgs.push_back(cppCode + ".fA");
|
||||
break;
|
||||
case Layout::CType::kSkV4:
|
||||
formatArgs->push_back(cppCode + ".x");
|
||||
formatArgs->push_back(cppCode + ".y");
|
||||
formatArgs->push_back(cppCode + ".z");
|
||||
formatArgs->push_back(cppCode + ".w");
|
||||
fFormatArgs.push_back(cppCode + ".x");
|
||||
fFormatArgs.push_back(cppCode + ".y");
|
||||
fFormatArgs.push_back(cppCode + ".z");
|
||||
fFormatArgs.push_back(cppCode + ".w");
|
||||
break;
|
||||
case Layout::CType::kSkRect:
|
||||
case Layout::CType::kSkRect: // fall through
|
||||
case Layout::CType::kDefault:
|
||||
formatArgs->push_back(cppCode + ".left()");
|
||||
formatArgs->push_back(cppCode + ".top()");
|
||||
formatArgs->push_back(cppCode + ".right()");
|
||||
formatArgs->push_back(cppCode + ".bottom()");
|
||||
fFormatArgs.push_back(cppCode + ".left()");
|
||||
fFormatArgs.push_back(cppCode + ".top()");
|
||||
fFormatArgs.push_back(cppCode + ".right()");
|
||||
fFormatArgs.push_back(cppCode + ".bottom()");
|
||||
break;
|
||||
default:
|
||||
SkASSERT(false);
|
||||
}
|
||||
return type.name() + "(%f, %f, %f, %f)";
|
||||
} else if (type.kind() == Type::kEnum_Kind) {
|
||||
this->write("%d");
|
||||
fFormatArgs.push_back("(int) " + cppCode);
|
||||
} else if (type == *fContext.fInt4_Type ||
|
||||
type == *fContext.fShort4_Type ||
|
||||
type == *fContext.fByte4_Type) {
|
||||
this->write(type.name() + "(%d, %d, %d, %d)");
|
||||
fFormatArgs.push_back(cppCode + ".left()");
|
||||
fFormatArgs.push_back(cppCode + ".top()");
|
||||
fFormatArgs.push_back(cppCode + ".right()");
|
||||
fFormatArgs.push_back(cppCode + ".bottom()");
|
||||
} else {
|
||||
printf("unsupported runtime value type '%s'\n", String(type.fName).c_str());
|
||||
SkASSERT(false);
|
||||
}
|
||||
if (type.kind() == Type::kMatrix_Kind) {
|
||||
SkASSERT(type.componentType() == *fContext.fFloat_Type ||
|
||||
type.componentType() == *fContext.fHalf_Type);
|
||||
|
||||
String format = type.name() + "(";
|
||||
for (int c = 0; c < type.columns(); ++c) {
|
||||
for (int r = 0; r < type.rows(); ++r) {
|
||||
String& arg = formatArgs->emplace_back();
|
||||
arg.appendf("%s.rc(%d, %d)", cppCode.c_str(), r, c);
|
||||
format += "%f, ";
|
||||
}
|
||||
}
|
||||
|
||||
// Replace trailing ", " with ")".
|
||||
format.pop_back();
|
||||
format.back() = ')';
|
||||
return format;
|
||||
}
|
||||
if (type.kind() == Type::kEnum_Kind) {
|
||||
formatArgs->push_back("(int) " + cppCode);
|
||||
return "%d";
|
||||
}
|
||||
if (type == *fContext.fInt4_Type ||
|
||||
type == *fContext.fShort4_Type ||
|
||||
type == *fContext.fByte4_Type) {
|
||||
formatArgs->push_back(cppCode + ".left()");
|
||||
formatArgs->push_back(cppCode + ".top()");
|
||||
formatArgs->push_back(cppCode + ".right()");
|
||||
formatArgs->push_back(cppCode + ".bottom()");
|
||||
return type.name() + "(%d, %d, %d, %d)";
|
||||
}
|
||||
|
||||
SkDEBUGFAILF("unsupported runtime value type '%s'\n", String(type.fName).c_str());
|
||||
return "";
|
||||
}
|
||||
|
||||
void CPPCodeGenerator::writeRuntimeValue(const Type& type, const Layout& layout,
|
||||
const String& cppCode) {
|
||||
this->write(this->formatRuntimeValue(type, layout, cppCode, &fFormatArgs));
|
||||
}
|
||||
|
||||
void CPPCodeGenerator::writeVarInitializer(const Variable& var, const Expression& value) {
|
||||
@ -1102,8 +1065,8 @@ void CPPCodeGenerator::writeOnTextureSampler() {
|
||||
void CPPCodeGenerator::writeClone() {
|
||||
if (!this->writeSection(kCloneSection)) {
|
||||
if (fSectionAndParameterHelper.getSection(kFieldsSection)) {
|
||||
fErrors.error(/*offset=*/0, "fragment processors with custom @fields must also have a "
|
||||
"custom @clone");
|
||||
fErrors.error(0, "fragment processors with custom @fields must also have a custom"
|
||||
"@clone");
|
||||
}
|
||||
this->writef("%s::%s(const %s& src)\n"
|
||||
": INHERITED(k%s_ClassID, src.optimizationFlags())", fFullName.c_str(),
|
||||
@ -1139,55 +1102,6 @@ void CPPCodeGenerator::writeClone() {
|
||||
}
|
||||
}
|
||||
|
||||
void CPPCodeGenerator::writeDumpInfo() {
|
||||
this->writef("#ifdef SK_DEBUG\n"
|
||||
"SkString %s::dumpInfo() const {\n", fFullName.c_str());
|
||||
|
||||
if (!this->writeSection(kDumpInfoSection)) {
|
||||
if (fSectionAndParameterHelper.getSection(kFieldsSection)) {
|
||||
fErrors.error(/*offset=*/0, "fragment processors with custom @fields must also have a "
|
||||
"custom @dumpInfo");
|
||||
}
|
||||
|
||||
this->writef(" return SkStringPrintf(\"%s", fName.c_str());
|
||||
|
||||
String formatString;
|
||||
std::vector<String> argumentList;
|
||||
|
||||
for (const Variable* param : fSectionAndParameterHelper.getParameters()) {
|
||||
// dumpInfo() doesn't need to log child FPs.
|
||||
if (param->fType.nonnullable() == *fContext.fFragmentProcessor_Type) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add this field onto the format string and argument list.
|
||||
String fieldName = HCodeGenerator::FieldName(String(param->fName).c_str());
|
||||
String runtimeValue = this->formatRuntimeValue(param->fType, param->fModifiers.fLayout,
|
||||
param->fName, &argumentList);
|
||||
formatString.appendf("%s%s=%s",
|
||||
formatString.empty() ? "" : ", ",
|
||||
fieldName.c_str(),
|
||||
runtimeValue.c_str());
|
||||
}
|
||||
|
||||
// Append finished format string.
|
||||
if (!formatString.empty()) {
|
||||
this->writef("(%s)", formatString.c_str());
|
||||
}
|
||||
|
||||
// Close-quote, then append each argument.
|
||||
this->write("\"");
|
||||
for (const String& argument : argumentList) {
|
||||
this->writef(", %s", argument.c_str());
|
||||
}
|
||||
|
||||
this->write(");");
|
||||
}
|
||||
|
||||
this->write("\n}\n"
|
||||
"#endif\n");
|
||||
}
|
||||
|
||||
void CPPCodeGenerator::writeTest() {
|
||||
const Section* test = fSectionAndParameterHelper.getSection(kTestCodeSection);
|
||||
if (test) {
|
||||
@ -1380,7 +1294,6 @@ bool CPPCodeGenerator::generateCode() {
|
||||
this->write(" return true;\n"
|
||||
"}\n");
|
||||
this->writeClone();
|
||||
this->writeDumpInfo();
|
||||
this->writeOnTextureSampler();
|
||||
this->writeTest();
|
||||
this->writeSection(kCppEndSection);
|
||||
|
@ -67,8 +67,6 @@ private:
|
||||
|
||||
// writes a printf escape that will be filled in at runtime by the given C++ expression string
|
||||
void writeRuntimeValue(const Type& type, const Layout& layout, const String& cppCode);
|
||||
String formatRuntimeValue(const Type& type, const Layout& layout, const String& cppCode,
|
||||
std::vector<String>* formatArgs);
|
||||
|
||||
void writeVarInitializer(const Variable& var, const Expression& value) override;
|
||||
|
||||
@ -90,8 +88,6 @@ private:
|
||||
|
||||
void writeClone();
|
||||
|
||||
void writeDumpInfo();
|
||||
|
||||
void writeTest();
|
||||
|
||||
// If the returned C++ is included in the generated code, then the variable name stored in
|
||||
|
@ -355,9 +355,6 @@ bool HCodeGenerator::generateCode() {
|
||||
this->writeSection(kClassSection);
|
||||
this->writeMake();
|
||||
this->writef(" %s(const %s& src);\n"
|
||||
"#ifdef SK_DEBUG\n"
|
||||
" SkString dumpInfo() const override;\n"
|
||||
"#endif\n"
|
||||
" std::unique_ptr<GrFragmentProcessor> clone() const override;\n"
|
||||
" const char* name() const override { return \"%s\"; }\n",
|
||||
fFullName.c_str(), fFullName.c_str(), fName.c_str());
|
||||
|
@ -24,7 +24,6 @@ inline constexpr char kConstructorCodeSection[] = "constructorCode";
|
||||
inline constexpr char kConstructorParamsSection[] = "constructorParams";
|
||||
inline constexpr char kCppSection[] = "cpp";
|
||||
inline constexpr char kCppEndSection[] = "cppEnd";
|
||||
inline constexpr char kDumpInfoSection[] = "dumpInfo";
|
||||
inline constexpr char kEmitCodeSection[] = "emitCode";
|
||||
inline constexpr char kFieldsSection[] = "fields";
|
||||
inline constexpr char kHeaderSection[] = "header";
|
||||
@ -75,7 +74,6 @@ public:
|
||||
!strcmp(name, kConstructorParamsSection) ||
|
||||
!strcmp(name, kCppSection) ||
|
||||
!strcmp(name, kCppEndSection) ||
|
||||
!strcmp(name, kDumpInfoSection) ||
|
||||
!strcmp(name, kEmitCodeSection) ||
|
||||
!strcmp(name, kFieldsSection) ||
|
||||
!strcmp(name, kHeaderSection) ||
|
||||
|
@ -113,9 +113,6 @@ public:
|
||||
return std::unique_ptr<GrFragmentProcessor>(new GrTest());
|
||||
}
|
||||
GrTest(const GrTest& src);
|
||||
#ifdef SK_DEBUG
|
||||
SkString dumpInfo() const override;
|
||||
#endif
|
||||
std::unique_ptr<GrFragmentProcessor> clone() const override;
|
||||
const char* name() const override { return "Test"; }
|
||||
private:
|
||||
@ -475,7 +472,6 @@ DEF_TEST(SkSLFPSections, r) {
|
||||
R"__SkSL__(
|
||||
@fields { fields section }
|
||||
@clone { }
|
||||
@dumpInfo { }
|
||||
void main() {
|
||||
sk_OutColor = half4(1);
|
||||
}
|
||||
@ -531,22 +527,6 @@ DEF_TEST(SkSLFPSections, r) {
|
||||
" testDataName section }\n"
|
||||
"#endif"
|
||||
});
|
||||
test(r,
|
||||
*SkSL::ShaderCapsFactory::Default(),
|
||||
R"__SkSL__(
|
||||
@dumpInfo {dump all the fields}
|
||||
void main() {
|
||||
sk_OutColor = half4(1);
|
||||
}
|
||||
)__SkSL__",
|
||||
/*expectedH=*/{},
|
||||
/*expectedCPP=*/{
|
||||
R"__Cpp__(#ifdef SK_DEBUG
|
||||
SkString GrTest::dumpInfo() const {
|
||||
dump all the fields
|
||||
}
|
||||
#endif)__Cpp__"
|
||||
});
|
||||
}
|
||||
|
||||
DEF_TEST(SkSLFPMainCoords, r) {
|
||||
|
Loading…
Reference in New Issue
Block a user