Remove GrFragmentProcessor::usesExplicitReturn.

All fragment processors now use explicit returns; sk_OutColor no longer
exists at all.

Change-Id: Ic5cf566a916c1d616edcc56ba84b6780776f8515
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344300
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This commit is contained in:
John Stiles 2020-12-15 11:24:30 -05:00 committed by Skia Commit-Bot
parent 06b52ada19
commit bead7e324a
187 changed files with 1 additions and 302 deletions

View File

@ -30,7 +30,6 @@ public:
}
const char* name() const override { return "ConstantMatrixEffect"; }
bool usesExplicitReturn() const override { return true; }
void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor& that) const override { return this == &that; }
std::unique_ptr<GrFragmentProcessor> clone() const override { return nullptr; }
@ -58,7 +57,6 @@ public:
}
const char* name() const override { return "UniformMatrixEffect"; }
bool usesExplicitReturn() const override { return true; }
void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor& that) const override { return this == &that; }
std::unique_ptr<GrFragmentProcessor> clone() const override { return nullptr; }
@ -95,7 +93,6 @@ public:
}
const char* name() const override { return "VariableMatrixEffect"; }
bool usesExplicitReturn() const override { return true; }
void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor& that) const override { return this == &that; }
std::unique_ptr<GrFragmentProcessor> clone() const override { return nullptr; }
@ -125,7 +122,6 @@ public:
}
const char* name() const override { return "ExplicitCoordEffect"; }
bool usesExplicitReturn() const override { return true; }
void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor& that) const override { return this == &that; }
std::unique_ptr<GrFragmentProcessor> clone() const override { return nullptr; }
@ -153,7 +149,6 @@ public:
}
const char* name() const override { return "TestPatternEffect"; }
bool usesExplicitReturn() const override { return true; }
void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor& that) const override { return this == &that; }
std::unique_ptr<GrFragmentProcessor> clone() const override { return nullptr; }

View File

@ -39,7 +39,6 @@ public:
}
const char* name() const override { return "SampleCoordEffect"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
SkASSERT(false);

View File

@ -28,7 +28,6 @@ public:
}
const char* name() const override { return "SampleMatrixConstantEffect"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
SkASSERT(false);

View File

@ -28,7 +28,6 @@ public:
}
const char* name() const override { return "SampleMatrixVariableEffect"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
SkASSERT(false);

View File

@ -122,7 +122,6 @@ public:
private:
const char* name() const override { return "VisualizeCoverageCountFP"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
return std::unique_ptr<GrFragmentProcessor>(new VisualizeCoverageCountFP(*this));

View File

@ -264,7 +264,6 @@ public:
~ColorTableEffect() override {}
const char* name() const override { return "ColorTableEffect"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
return std::unique_ptr<GrFragmentProcessor>(new ColorTableEffect(*this));

View File

@ -198,7 +198,6 @@ public:
const SkVector& scale() const { return fScale; }
const char* name() const override { return "DisplacementMap"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override;

View File

@ -656,7 +656,6 @@ public:
}
const char* name() const override { return "DiffuseLighting"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
return std::unique_ptr<GrFragmentProcessor>(new GrDiffuseLightingEffect(*this));
@ -705,7 +704,6 @@ public:
}
const char* name() const override { return "SpecularLighting"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
return std::unique_ptr<GrFragmentProcessor>(new GrSpecularLightingEffect(*this));

View File

@ -197,7 +197,6 @@ public:
}
const char* name() const override { return "Morphology"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
return std::unique_ptr<GrFragmentProcessor>(new GrMorphologyEffect(*this));

View File

@ -77,7 +77,6 @@ public:
const char* name() const override { return "ColorSpaceXform"; }
std::unique_ptr<GrFragmentProcessor> clone() const override;
bool usesExplicitReturn() const override { return true; }
const GrColorSpaceXform* colorXform() const { return fColorXform.get(); }

View File

@ -267,7 +267,6 @@ std::unique_ptr<GrFragmentProcessor> GrFragmentProcessor::SwizzleOutput(
const char* name() const override { return "Swizzle"; }
const GrSwizzle& swizzle() const { return fSwizzle; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
return Make(this->childProcessor(0)->clone(), fSwizzle);
@ -335,7 +334,6 @@ std::unique_ptr<GrFragmentProcessor> GrFragmentProcessor::MakeInputPremulAndMulB
}
const char* name() const override { return "Premultiply"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
return Make(this->childProcessor(0)->clone());
@ -448,7 +446,6 @@ std::unique_ptr<GrFragmentProcessor> GrFragmentProcessor::Compose(
void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
bool usesExplicitReturn() const override { return true; }
SkPMColor4f constantOutputForConstantInput(const SkPMColor4f& inColor) const override {
SkPMColor4f color = inColor;

View File

@ -189,9 +189,6 @@ public:
return SkToBool(fFlags & kNetTransformHasPerspective_Flag);
}
// sk_OutColor has been removed; this must return true.
virtual bool usesExplicitReturn() const = 0;
// The SampleUsage describing how this FP is invoked by its parent using 'sample(matrix)'
// This only reflects the immediate sampling from parent to this FP
const SkSL::SampleUsage& sampleUsage() const {

View File

@ -28,7 +28,6 @@ public:
IsCoverageCount, MustCheckBounds);
const char* name() const override { return "GrCCClipProcessor"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override;
void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;

View File

@ -33,8 +33,6 @@ public:
const char* name() const override { return "Bicubic"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
return std::unique_ptr<GrFragmentProcessor>(new GrBicubicEffect(*this));
}

View File

@ -176,8 +176,6 @@ private:
return fMode == cs.fMode;
}
bool usesExplicitReturn() const override { return true; }
SkPMColor4f constantOutputForConstantInput(const SkPMColor4f& input) const override {
const auto* src = this->childProcessor(0);
const auto* dst = this->childProcessor(1);

View File

@ -60,7 +60,6 @@ public:
~GrConvexPolyEffect() override;
const char* name() const override { return "ConvexPoly"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override;
GrClipEdgeType getEdgeType() const { return fEdgeType; }

View File

@ -39,7 +39,6 @@ public:
const GrCaps&);
const char* name() const override { return "GaussianConvolution"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
return std::unique_ptr<GrFragmentProcessor>(

View File

@ -43,7 +43,6 @@ public:
bool convolveAlpha() const { return fConvolveAlpha; }
const char* name() const override { return "MatrixConvolution"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override;

View File

@ -23,7 +23,6 @@ public:
return std::unique_ptr<GrFragmentProcessor>(new GrMatrixEffect(matrix, std::move(child)));
}
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "MatrixEffect"; }
const SkMatrix& matrix() const { return fMatrix; }

View File

@ -51,7 +51,6 @@ public:
~CircularRRectEffect() override {}
const char* name() const override { return "CircularRRect"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override;
@ -410,8 +409,6 @@ public:
const char* name() const override { return "EllipticalRRect"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override;
const SkRRect& getRRect() const { return fRRect; }

View File

@ -44,8 +44,6 @@ public:
std::unique_ptr<GrFragmentProcessor> clone() const override;
bool usesExplicitReturn() const override { return true; }
private:
using ShaderErrorHandler = GrContextOptions::ShaderErrorHandler;

View File

@ -91,7 +91,6 @@ public:
const float border[4] = kDefaultBorder);
std::unique_ptr<GrFragmentProcessor> clone() const override;
bool usesExplicitReturn() const override { return true; }
const char* name() const override { return "TextureEffect"; }

View File

@ -26,7 +26,6 @@ public:
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "YUVtoRGBEffect"; }
bool usesExplicitReturn() const override { return true; }
private:
GrYUVtoRGBEffect(std::unique_ptr<GrFragmentProcessor> planeFPs[4],

View File

@ -102,7 +102,6 @@ bool GrAARectEffect::onIsEqual(const GrFragmentProcessor& other) const {
if (rect != that.rect) return false;
return true;
}
bool GrAARectEffect::usesExplicitReturn() const { return true; }
GrAARectEffect::GrAARectEffect(const GrAARectEffect& src)
: INHERITED(kGrAARectEffect_ClassID, src.optimizationFlags())
, edgeType(src.edgeType)

View File

@ -27,7 +27,6 @@ public:
GrAARectEffect(const GrAARectEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "AARectEffect"; }
bool usesExplicitReturn() const override;
GrClipEdgeType edgeType;
SkRect rect;

View File

@ -86,7 +86,6 @@ bool GrAlphaThresholdFragmentProcessor::onIsEqual(const GrFragmentProcessor& oth
if (outerThreshold != that.outerThreshold) return false;
return true;
}
bool GrAlphaThresholdFragmentProcessor::usesExplicitReturn() const { return true; }
GrAlphaThresholdFragmentProcessor::GrAlphaThresholdFragmentProcessor(
const GrAlphaThresholdFragmentProcessor& src)
: INHERITED(kGrAlphaThresholdFragmentProcessor_ClassID, src.optimizationFlags())

View File

@ -28,7 +28,6 @@ public:
GrAlphaThresholdFragmentProcessor(const GrAlphaThresholdFragmentProcessor& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "AlphaThresholdFragmentProcessor"; }
bool usesExplicitReturn() const override;
float innerThreshold;
float outerThreshold;

View File

@ -72,7 +72,6 @@ bool GrArithmeticProcessor::onIsEqual(const GrFragmentProcessor& other) const {
if (enforcePMColor != that.enforcePMColor) return false;
return true;
}
bool GrArithmeticProcessor::usesExplicitReturn() const { return true; }
GrArithmeticProcessor::GrArithmeticProcessor(const GrArithmeticProcessor& src)
: INHERITED(kGrArithmeticProcessor_ClassID, src.optimizationFlags())
, k(src.k)

View File

@ -31,7 +31,6 @@ public:
GrArithmeticProcessor(const GrArithmeticProcessor& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "ArithmeticProcessor"; }
bool usesExplicitReturn() const override;
SkV4 k;
bool enforcePMColor;

View File

@ -61,7 +61,6 @@ bool GrBlurredEdgeFragmentProcessor::onIsEqual(const GrFragmentProcessor& other)
if (mode != that.mode) return false;
return true;
}
bool GrBlurredEdgeFragmentProcessor::usesExplicitReturn() const { return true; }
GrBlurredEdgeFragmentProcessor::GrBlurredEdgeFragmentProcessor(
const GrBlurredEdgeFragmentProcessor& src)
: INHERITED(kGrBlurredEdgeFragmentProcessor_ClassID, src.optimizationFlags())

View File

@ -27,7 +27,6 @@ public:
GrBlurredEdgeFragmentProcessor(const GrBlurredEdgeFragmentProcessor& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "BlurredEdgeFragmentProcessor"; }
bool usesExplicitReturn() const override;
Mode mode;
private:

View File

@ -357,7 +357,6 @@ bool GrCircleBlurFragmentProcessor::onIsEqual(const GrFragmentProcessor& other)
if (textureRadius != that.textureRadius) return false;
return true;
}
bool GrCircleBlurFragmentProcessor::usesExplicitReturn() const { return true; }
GrCircleBlurFragmentProcessor::GrCircleBlurFragmentProcessor(
const GrCircleBlurFragmentProcessor& src)
: INHERITED(kGrCircleBlurFragmentProcessor_ClassID, src.optimizationFlags())

View File

@ -27,7 +27,6 @@ public:
GrCircleBlurFragmentProcessor(const GrCircleBlurFragmentProcessor& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "CircleBlurFragmentProcessor"; }
bool usesExplicitReturn() const override;
SkRect circleRect;
float solidRadius;
float textureRadius;

View File

@ -110,7 +110,6 @@ bool GrCircleEffect::onIsEqual(const GrFragmentProcessor& other) const {
if (radius != that.radius) return false;
return true;
}
bool GrCircleEffect::usesExplicitReturn() const { return true; }
GrCircleEffect::GrCircleEffect(const GrCircleEffect& src)
: INHERITED(kGrCircleEffect_ClassID, src.optimizationFlags())
, edgeType(src.edgeType)

View File

@ -33,7 +33,6 @@ public:
GrCircleEffect(const GrCircleEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "CircleEffect"; }
bool usesExplicitReturn() const override;
GrClipEdgeType edgeType;
SkPoint center;
float radius;

View File

@ -56,7 +56,6 @@ bool GrClampFragmentProcessor::onIsEqual(const GrFragmentProcessor& other) const
if (clampToPremul != that.clampToPremul) return false;
return true;
}
bool GrClampFragmentProcessor::usesExplicitReturn() const { return true; }
GrClampFragmentProcessor::GrClampFragmentProcessor(const GrClampFragmentProcessor& src)
: INHERITED(kGrClampFragmentProcessor_ClassID, src.optimizationFlags())
, clampToPremul(src.clampToPremul) {

View File

@ -33,7 +33,6 @@ public:
GrClampFragmentProcessor(const GrClampFragmentProcessor& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "ClampFragmentProcessor"; }
bool usesExplicitReturn() const override;
bool clampToPremul;
private:

View File

@ -110,7 +110,6 @@ bool GrColorMatrixFragmentProcessor::onIsEqual(const GrFragmentProcessor& other)
if (premulOutput != that.premulOutput) return false;
return true;
}
bool GrColorMatrixFragmentProcessor::usesExplicitReturn() const { return true; }
GrColorMatrixFragmentProcessor::GrColorMatrixFragmentProcessor(
const GrColorMatrixFragmentProcessor& src)
: INHERITED(kGrColorMatrixFragmentProcessor_ClassID, src.optimizationFlags())

View File

@ -59,7 +59,6 @@ public:
GrColorMatrixFragmentProcessor(const GrColorMatrixFragmentProcessor& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "ColorMatrixFragmentProcessor"; }
bool usesExplicitReturn() const override;
SkM44 m;
SkV4 v;
bool unpremulInput;

View File

@ -56,7 +56,6 @@ bool GrComposeLerpEffect::onIsEqual(const GrFragmentProcessor& other) const {
if (weight != that.weight) return false;
return true;
}
bool GrComposeLerpEffect::usesExplicitReturn() const { return true; }
GrComposeLerpEffect::GrComposeLerpEffect(const GrComposeLerpEffect& src)
: INHERITED(kGrComposeLerpEffect_ClassID, src.optimizationFlags()), weight(src.weight) {
this->cloneAndRegisterAllChildProcessors(src);

View File

@ -27,7 +27,6 @@ public:
GrComposeLerpEffect(const GrComposeLerpEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "ComposeLerpEffect"; }
bool usesExplicitReturn() const override;
float weight;
private:

View File

@ -61,7 +61,6 @@ bool GrConfigConversionEffect::onIsEqual(const GrFragmentProcessor& other) const
if (pmConversion != that.pmConversion) return false;
return true;
}
bool GrConfigConversionEffect::usesExplicitReturn() const { return true; }
GrConfigConversionEffect::GrConfigConversionEffect(const GrConfigConversionEffect& src)
: INHERITED(kGrConfigConversionEffect_ClassID, src.optimizationFlags())
, pmConversion(src.pmConversion) {

View File

@ -37,7 +37,6 @@ public:
GrConfigConversionEffect(const GrConfigConversionEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "ConfigConversionEffect"; }
bool usesExplicitReturn() const override;
PMConversion pmConversion;
private:

View File

@ -60,7 +60,6 @@ bool GrConstColorProcessor::onIsEqual(const GrFragmentProcessor& other) const {
if (color != that.color) return false;
return true;
}
bool GrConstColorProcessor::usesExplicitReturn() const { return true; }
GrConstColorProcessor::GrConstColorProcessor(const GrConstColorProcessor& src)
: INHERITED(kGrConstColorProcessor_ClassID, src.optimizationFlags()), color(src.color) {
this->cloneAndRegisterAllChildProcessors(src);

View File

@ -27,7 +27,6 @@ public:
GrConstColorProcessor(const GrConstColorProcessor& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "ConstColorProcessor"; }
bool usesExplicitReturn() const override;
SkPMColor4f color;
private:

View File

@ -46,7 +46,6 @@ bool GrDeviceSpaceEffect::onIsEqual(const GrFragmentProcessor& other) const {
(void)that;
return true;
}
bool GrDeviceSpaceEffect::usesExplicitReturn() const { return true; }
GrDeviceSpaceEffect::GrDeviceSpaceEffect(const GrDeviceSpaceEffect& src)
: INHERITED(kGrDeviceSpaceEffect_ClassID, src.optimizationFlags()) {
this->cloneAndRegisterAllChildProcessors(src);

View File

@ -28,7 +28,6 @@ public:
GrDeviceSpaceEffect(const GrDeviceSpaceEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "DeviceSpaceEffect"; }
bool usesExplicitReturn() const override;
private:
GrDeviceSpaceEffect(std::unique_ptr<GrFragmentProcessor> fp)

View File

@ -67,7 +67,6 @@ bool GrDitherEffect::onIsEqual(const GrFragmentProcessor& other) const {
if (range != that.range) return false;
return true;
}
bool GrDitherEffect::usesExplicitReturn() const { return true; }
GrDitherEffect::GrDitherEffect(const GrDitherEffect& src)
: INHERITED(kGrDitherEffect_ClassID, src.optimizationFlags()), range(src.range) {
this->cloneAndRegisterAllChildProcessors(src);

View File

@ -28,7 +28,6 @@ public:
GrDitherEffect(const GrDitherEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "DitherEffect"; }
bool usesExplicitReturn() const override;
float range;
private:

View File

@ -150,7 +150,6 @@ bool GrEllipseEffect::onIsEqual(const GrFragmentProcessor& other) const {
if (radii != that.radii) return false;
return true;
}
bool GrEllipseEffect::usesExplicitReturn() const { return true; }
GrEllipseEffect::GrEllipseEffect(const GrEllipseEffect& src)
: INHERITED(kGrEllipseEffect_ClassID, src.optimizationFlags())
, edgeType(src.edgeType)

View File

@ -43,7 +43,6 @@ public:
GrEllipseEffect(const GrEllipseEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "EllipseEffect"; }
bool usesExplicitReturn() const override;
GrClipEdgeType edgeType;
SkPoint center;
SkPoint radii;

View File

@ -53,7 +53,6 @@ bool GrHSLToRGBFilterEffect::onIsEqual(const GrFragmentProcessor& other) const {
(void)that;
return true;
}
bool GrHSLToRGBFilterEffect::usesExplicitReturn() const { return true; }
GrHSLToRGBFilterEffect::GrHSLToRGBFilterEffect(const GrHSLToRGBFilterEffect& src)
: INHERITED(kGrHSLToRGBFilterEffect_ClassID, src.optimizationFlags()) {
this->cloneAndRegisterAllChildProcessors(src);

View File

@ -38,7 +38,6 @@ public:
GrHSLToRGBFilterEffect(const GrHSLToRGBFilterEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "HSLToRGBFilterEffect"; }
bool usesExplicitReturn() const override;
private:
GrHSLToRGBFilterEffect(std::unique_ptr<GrFragmentProcessor> inputFP)

View File

@ -150,7 +150,6 @@ bool GrHighContrastFilterEffect::onIsEqual(const GrFragmentProcessor& other) con
if (linearize != that.linearize) return false;
return true;
}
bool GrHighContrastFilterEffect::usesExplicitReturn() const { return true; }
GrHighContrastFilterEffect::GrHighContrastFilterEffect(const GrHighContrastFilterEffect& src)
: INHERITED(kGrHighContrastFilterEffect_ClassID, src.optimizationFlags())
, contrastMod(src.contrastMod)

View File

@ -37,7 +37,6 @@ public:
GrHighContrastFilterEffect(const GrHighContrastFilterEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "HighContrastFilterEffect"; }
bool usesExplicitReturn() const override;
float contrastMod;
bool hasContrast;
bool grayscale;

View File

@ -48,7 +48,6 @@ bool GrLumaColorFilterEffect::onIsEqual(const GrFragmentProcessor& other) const
(void)that;
return true;
}
bool GrLumaColorFilterEffect::usesExplicitReturn() const { return true; }
GrLumaColorFilterEffect::GrLumaColorFilterEffect(const GrLumaColorFilterEffect& src)
: INHERITED(kGrLumaColorFilterEffect_ClassID, src.optimizationFlags()) {
this->cloneAndRegisterAllChildProcessors(src);

View File

@ -33,7 +33,6 @@ public:
GrLumaColorFilterEffect(const GrLumaColorFilterEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "LumaColorFilterEffect"; }
bool usesExplicitReturn() const override;
private:
GrLumaColorFilterEffect(std::unique_ptr<GrFragmentProcessor> inputFP)

View File

@ -133,7 +133,6 @@ bool GrMagnifierEffect::onIsEqual(const GrFragmentProcessor& other) const {
if (yInvInset != that.yInvInset) return false;
return true;
}
bool GrMagnifierEffect::usesExplicitReturn() const { return true; }
GrMagnifierEffect::GrMagnifierEffect(const GrMagnifierEffect& src)
: INHERITED(kGrMagnifierEffect_ClassID, src.optimizationFlags())
, bounds(src.bounds)

View File

@ -31,7 +31,6 @@ public:
GrMagnifierEffect(const GrMagnifierEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "MagnifierEffect"; }
bool usesExplicitReturn() const override;
SkIRect bounds;
SkRect srcRect;
float xInvZoom;

View File

@ -62,7 +62,6 @@ bool GrMixerEffect::onIsEqual(const GrFragmentProcessor& other) const {
if (weight != that.weight) return false;
return true;
}
bool GrMixerEffect::usesExplicitReturn() const { return true; }
GrMixerEffect::GrMixerEffect(const GrMixerEffect& src)
: INHERITED(kGrMixerEffect_ClassID, src.optimizationFlags()), weight(src.weight) {
this->cloneAndRegisterAllChildProcessors(src);

View File

@ -35,7 +35,6 @@ public:
GrMixerEffect(const GrMixerEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "MixerEffect"; }
bool usesExplicitReturn() const override;
float weight;
private:

View File

@ -84,7 +84,6 @@ bool GrOverrideInputFragmentProcessor::onIsEqual(const GrFragmentProcessor& othe
if (literalColor != that.literalColor) return false;
return true;
}
bool GrOverrideInputFragmentProcessor::usesExplicitReturn() const { return true; }
GrOverrideInputFragmentProcessor::GrOverrideInputFragmentProcessor(
const GrOverrideInputFragmentProcessor& src)
: INHERITED(kGrOverrideInputFragmentProcessor_ClassID, src.optimizationFlags())

View File

@ -44,7 +44,6 @@ public:
GrOverrideInputFragmentProcessor(const GrOverrideInputFragmentProcessor& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "OverrideInputFragmentProcessor"; }
bool usesExplicitReturn() const override;
bool useUniform;
SkPMColor4f uniformColor;
SkPMColor4f literalColor;

View File

@ -55,7 +55,6 @@ bool GrRGBToHSLFilterEffect::onIsEqual(const GrFragmentProcessor& other) const {
(void)that;
return true;
}
bool GrRGBToHSLFilterEffect::usesExplicitReturn() const { return true; }
GrRGBToHSLFilterEffect::GrRGBToHSLFilterEffect(const GrRGBToHSLFilterEffect& src)
: INHERITED(kGrRGBToHSLFilterEffect_ClassID, src.optimizationFlags()) {
this->cloneAndRegisterAllChildProcessors(src);

View File

@ -40,7 +40,6 @@ public:
GrRGBToHSLFilterEffect(const GrRGBToHSLFilterEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "RGBToHSLFilterEffect"; }
bool usesExplicitReturn() const override;
private:
GrRGBToHSLFilterEffect(std::unique_ptr<GrFragmentProcessor> inputFP)

View File

@ -427,7 +427,6 @@ bool GrRRectBlurEffect::onIsEqual(const GrFragmentProcessor& other) const {
if (cornerRadius != that.cornerRadius) return false;
return true;
}
bool GrRRectBlurEffect::usesExplicitReturn() const { return true; }
GrRRectBlurEffect::GrRRectBlurEffect(const GrRRectBlurEffect& src)
: INHERITED(kGrRRectBlurEffect_ClassID, src.optimizationFlags())
, sigma(src.sigma)

View File

@ -31,7 +31,6 @@ public:
GrRRectBlurEffect(const GrRRectBlurEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "RRectBlurEffect"; }
bool usesExplicitReturn() const override;
float sigma;
SkRect rect;
float cornerRadius;

View File

@ -172,7 +172,6 @@ bool GrRectBlurEffect::onIsEqual(const GrFragmentProcessor& other) const {
if (isFast != that.isFast) return false;
return true;
}
bool GrRectBlurEffect::usesExplicitReturn() const { return true; }
GrRectBlurEffect::GrRectBlurEffect(const GrRectBlurEffect& src)
: INHERITED(kGrRectBlurEffect_ClassID, src.optimizationFlags())
, rect(src.rect)

View File

@ -152,7 +152,6 @@ public:
GrRectBlurEffect(const GrRectBlurEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "RectBlurEffect"; }
bool usesExplicitReturn() const override;
SkRect rect;
bool applyInvVM;
SkMatrix invVM;

View File

@ -188,8 +188,6 @@ SkString GrGLSLFPFragmentBuilder::writeProcessorFunction(GrGLSLFragmentProcessor
} // else the function keeps its two arguments
fp->emitCode(args);
SkASSERT(args.fFp.usesExplicitReturn());
SkASSERT(SkStrContains(this->code().c_str(), "return"));
SkString funcName = this->getMangledFunctionName(args.fFp.name());
this->emitFunction(kHalf4_GrSLType, funcName.c_str(), {params, paramCount},

View File

@ -103,7 +103,6 @@ bool GrClampedGradientEffect::onIsEqual(const GrFragmentProcessor& other) const
if (colorsAreOpaque != that.colorsAreOpaque) return false;
return true;
}
bool GrClampedGradientEffect::usesExplicitReturn() const { return true; }
GrClampedGradientEffect::GrClampedGradientEffect(const GrClampedGradientEffect& src)
: INHERITED(kGrClampedGradientEffect_ClassID, src.optimizationFlags())
, leftBorderColor(src.leftBorderColor)

View File

@ -32,7 +32,6 @@ public:
GrClampedGradientEffect(const GrClampedGradientEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "ClampedGradientEffect"; }
bool usesExplicitReturn() const override;
SkPMColor4f leftBorderColor;
SkPMColor4f rightBorderColor;
bool makePremul;

View File

@ -125,7 +125,6 @@ bool GrDualIntervalGradientColorizer::onIsEqual(const GrFragmentProcessor& other
if (threshold != that.threshold) return false;
return true;
}
bool GrDualIntervalGradientColorizer::usesExplicitReturn() const { return true; }
GrDualIntervalGradientColorizer::GrDualIntervalGradientColorizer(
const GrDualIntervalGradientColorizer& src)
: INHERITED(kGrDualIntervalGradientColorizer_ClassID, src.optimizationFlags())

View File

@ -26,7 +26,6 @@ public:
GrDualIntervalGradientColorizer(const GrDualIntervalGradientColorizer& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "DualIntervalGradientColorizer"; }
bool usesExplicitReturn() const override;
SkPMColor4f scale01;
SkPMColor4f bias01;
SkPMColor4f scale23;

View File

@ -45,7 +45,6 @@ bool GrLinearGradientLayout::onIsEqual(const GrFragmentProcessor& other) const {
(void)that;
return true;
}
bool GrLinearGradientLayout::usesExplicitReturn() const { return true; }
GrLinearGradientLayout::GrLinearGradientLayout(const GrLinearGradientLayout& src)
: INHERITED(kGrLinearGradientLayout_ClassID, src.optimizationFlags()) {
this->cloneAndRegisterAllChildProcessors(src);

View File

@ -27,7 +27,6 @@ public:
GrLinearGradientLayout(const GrLinearGradientLayout& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "LinearGradientLayout"; }
bool usesExplicitReturn() const override;
private:
GrLinearGradientLayout()

View File

@ -45,7 +45,6 @@ bool GrRadialGradientLayout::onIsEqual(const GrFragmentProcessor& other) const {
(void)that;
return true;
}
bool GrRadialGradientLayout::usesExplicitReturn() const { return true; }
GrRadialGradientLayout::GrRadialGradientLayout(const GrRadialGradientLayout& src)
: INHERITED(kGrRadialGradientLayout_ClassID, src.optimizationFlags()) {
this->cloneAndRegisterAllChildProcessors(src);

View File

@ -27,7 +27,6 @@ public:
GrRadialGradientLayout(const GrRadialGradientLayout& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "RadialGradientLayout"; }
bool usesExplicitReturn() const override;
private:
GrRadialGradientLayout()

View File

@ -76,7 +76,6 @@ bool GrSingleIntervalGradientColorizer::onIsEqual(const GrFragmentProcessor& oth
if (end != that.end) return false;
return true;
}
bool GrSingleIntervalGradientColorizer::usesExplicitReturn() const { return true; }
GrSingleIntervalGradientColorizer::GrSingleIntervalGradientColorizer(
const GrSingleIntervalGradientColorizer& src)
: INHERITED(kGrSingleIntervalGradientColorizer_ClassID, src.optimizationFlags())

View File

@ -25,7 +25,6 @@ public:
GrSingleIntervalGradientColorizer(const GrSingleIntervalGradientColorizer& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "SingleIntervalGradientColorizer"; }
bool usesExplicitReturn() const override;
SkPMColor4f start;
SkPMColor4f end;

View File

@ -76,7 +76,6 @@ bool GrSweepGradientLayout::onIsEqual(const GrFragmentProcessor& other) const {
if (scale != that.scale) return false;
return true;
}
bool GrSweepGradientLayout::usesExplicitReturn() const { return true; }
GrSweepGradientLayout::GrSweepGradientLayout(const GrSweepGradientLayout& src)
: INHERITED(kGrSweepGradientLayout_ClassID, src.optimizationFlags())
, bias(src.bias)

View File

@ -27,7 +27,6 @@ public:
GrSweepGradientLayout(const GrSweepGradientLayout& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "SweepGradientLayout"; }
bool usesExplicitReturn() const override;
float bias;
float scale;

View File

@ -89,7 +89,6 @@ bool GrTiledGradientEffect::onIsEqual(const GrFragmentProcessor& other) const {
if (colorsAreOpaque != that.colorsAreOpaque) return false;
return true;
}
bool GrTiledGradientEffect::usesExplicitReturn() const { return true; }
GrTiledGradientEffect::GrTiledGradientEffect(const GrTiledGradientEffect& src)
: INHERITED(kGrTiledGradientEffect_ClassID, src.optimizationFlags())
, mirror(src.mirror)

View File

@ -30,7 +30,6 @@ public:
GrTiledGradientEffect(const GrTiledGradientEffect& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "TiledGradientEffect"; }
bool usesExplicitReturn() const override;
bool mirror;
bool makePremul;
bool colorsAreOpaque;

View File

@ -168,7 +168,6 @@ bool GrTwoPointConicalGradientLayout::onIsEqual(const GrFragmentProcessor& other
if (focalParams != that.focalParams) return false;
return true;
}
bool GrTwoPointConicalGradientLayout::usesExplicitReturn() const { return true; }
GrTwoPointConicalGradientLayout::GrTwoPointConicalGradientLayout(
const GrTwoPointConicalGradientLayout& src)
: INHERITED(kGrTwoPointConicalGradientLayout_ClassID, src.optimizationFlags())

View File

@ -29,7 +29,6 @@ public:
GrTwoPointConicalGradientLayout(const GrTwoPointConicalGradientLayout& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "TwoPointConicalGradientLayout"; }
bool usesExplicitReturn() const override;
Type type;
bool isRadiusIncreasing;
bool isFocalOnCircle;

View File

@ -317,7 +317,6 @@ bool GrUnrolledBinaryGradientColorizer::onIsEqual(const GrFragmentProcessor& oth
if (thresholds9_13 != that.thresholds9_13) return false;
return true;
}
bool GrUnrolledBinaryGradientColorizer::usesExplicitReturn() const { return true; }
GrUnrolledBinaryGradientColorizer::GrUnrolledBinaryGradientColorizer(
const GrUnrolledBinaryGradientColorizer& src)
: INHERITED(kGrUnrolledBinaryGradientColorizer_ClassID, src.optimizationFlags())

View File

@ -26,7 +26,6 @@ public:
GrUnrolledBinaryGradientColorizer(const GrUnrolledBinaryGradientColorizer& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "UnrolledBinaryGradientColorizer"; }
bool usesExplicitReturn() const override;
int32_t intervalCount;
SkPMColor4f scale0_1;
SkPMColor4f scale2_3;

View File

@ -744,7 +744,6 @@ public:
}
const char* name() const override { return "PerlinNoise"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
return std::unique_ptr<GrFragmentProcessor>(new GrPerlinNoise2Effect(*this));
@ -1113,7 +1112,6 @@ public:
}
const char* name() const override { return "ImprovedPerlinNoise"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
return std::unique_ptr<GrFragmentProcessor>(new GrImprovedPerlinNoiseEffect(*this));

View File

@ -1475,10 +1475,6 @@ bool CPPCodeGenerator::generateCode() {
}
this->write(" return true;\n"
"}\n");
this->writef("bool %s::usesExplicitReturn() const {\n"
" return true;\n"
"}\n",
fullName);
this->writeClone();
this->writeDumpInfo();
this->writeOnTextureSampler();

View File

@ -364,8 +364,7 @@ bool HCodeGenerator::generateCode() {
this->writeMake();
this->writef(" %s(const %s& src);\n"
" std::unique_ptr<GrFragmentProcessor> clone() const override;\n"
" const char* name() const override { return \"%s\"; }\n"
" bool usesExplicitReturn() const override;\n",
" const char* name() const override { return \"%s\"; }\n",
fFullName.c_str(), fFullName.c_str(), fName.c_str());
this->writeFields();
this->writef("private:\n");

View File

@ -152,7 +152,6 @@ public:
private:
const char* name() const override { return "LazyProxyTest::ClipFP"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
return std::make_unique<ClipFP>(fContext, fProxyProvider, fTest, fAtlas);
}

View File

@ -98,7 +98,6 @@ public:
}
const char* name() const override { return "test"; }
bool usesExplicitReturn() const override { return true; }
void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
static std::atomic<int32_t> nextKey{0};

View File

@ -63,8 +63,6 @@ public:
const char* name() const override { return "Big_Ole_Key"; }
bool usesExplicitReturn() const override { return true; }
GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
return new GLBigKeyProcessor;
}
@ -101,8 +99,6 @@ public:
const char* name() const override { return "Block_Input"; }
bool usesExplicitReturn() const override { return true; }
GrGLSLFragmentProcessor* onCreateGLSLInstance() const override { return new GLFP; }
std::unique_ptr<GrFragmentProcessor> clone() const override {

View File

@ -45,7 +45,6 @@ public:
private:
const char* name() const override { return "VisualizeCrossProductSignFP"; }
bool usesExplicitReturn() const override { return true; }
std::unique_ptr<GrFragmentProcessor> clone() const override {
return std::unique_ptr<GrFragmentProcessor>(new VisualizeCrossProductSignFP(fA, fB));
}

View File

@ -44,9 +44,6 @@ bool GrRecursion::onIsEqual(const GrFragmentProcessor& other) const {
(void) that;
return true;
}
bool GrRecursion::usesExplicitReturn() const {
return true;
}
GrRecursion::GrRecursion(const GrRecursion& src)
: INHERITED(kGrRecursion_ClassID, src.optimizationFlags()) {
this->cloneAndRegisterAllChildProcessors(src);

View File

@ -20,7 +20,6 @@ public:
GrRecursion(const GrRecursion& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "Recursion"; }
bool usesExplicitReturn() const override;
private:
GrRecursion()
: INHERITED(kGrRecursion_ClassID, kNone_OptimizationFlags) {

View File

@ -49,9 +49,6 @@ bool GrChildProcessorAndGlobal::onIsEqual(const GrFragmentProcessor& other) cons
(void) that;
return true;
}
bool GrChildProcessorAndGlobal::usesExplicitReturn() const {
return true;
}
GrChildProcessorAndGlobal::GrChildProcessorAndGlobal(const GrChildProcessorAndGlobal& src)
: INHERITED(kGrChildProcessorAndGlobal_ClassID, src.optimizationFlags()) {
this->cloneAndRegisterAllChildProcessors(src);

View File

@ -20,7 +20,6 @@ public:
GrChildProcessorAndGlobal(const GrChildProcessorAndGlobal& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "ChildProcessorAndGlobal"; }
bool usesExplicitReturn() const override;
private:
GrChildProcessorAndGlobal(std::unique_ptr<GrFragmentProcessor> child)
: INHERITED(kGrChildProcessorAndGlobal_ClassID, kNone_OptimizationFlags) {

View File

@ -49,9 +49,6 @@ bool GrChildProcessorFieldAccess::onIsEqual(const GrFragmentProcessor& other) co
(void) that;
return true;
}
bool GrChildProcessorFieldAccess::usesExplicitReturn() const {
return true;
}
GrChildProcessorFieldAccess::GrChildProcessorFieldAccess(const GrChildProcessorFieldAccess& src)
: INHERITED(kGrChildProcessorFieldAccess_ClassID, src.optimizationFlags()) {
this->cloneAndRegisterAllChildProcessors(src);

Some files were not shown because too many files have changed in this diff Show More