aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGeometryProcessor.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-06-06 17:16:05 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-06 21:56:24 +0000
commit969bdef64139c417f5c0b8f2fbf2638bb9d7dc95 (patch)
treefb59076e70b44760382842b574dd4e132cbc25e6 /src/gpu/GrGeometryProcessor.h
parent7db95a645147b7fef47647dc5d3df32b05b141d9 (diff)
Remove GrGeometryProcessor knowledge of explicit local coords
This seems to be part of an older model where the base class was more aware of how subclasses handled local coords. Only the default geometry processor uses it and it already incorporates the existence of explicit local coords into its shader key. Other GPs that used explicit local coords don't use this. Change-Id: Ia396f2a5e626e57470905ae770f1576386c0cefb Reviewed-on: https://skia-review.googlesource.com/132665 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrGeometryProcessor.h')
-rw-r--r--src/gpu/GrGeometryProcessor.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/gpu/GrGeometryProcessor.h b/src/gpu/GrGeometryProcessor.h
index acd122eef5..a12ab0058d 100644
--- a/src/gpu/GrGeometryProcessor.h
+++ b/src/gpu/GrGeometryProcessor.h
@@ -22,15 +22,10 @@ public:
GrGeometryProcessor(ClassID classID)
: INHERITED(classID)
, fWillUseGeoShader(false)
- , fLocalCoordsType(kUnused_LocalCoordsType)
, fSampleShading(0.0) {}
bool willUseGeoShader() const final { return fWillUseGeoShader; }
- bool hasExplicitLocalCoords() const final {
- return kHasExplicit_LocalCoordsType == fLocalCoordsType;
- }
-
/**
* Returns the minimum fraction of samples for which the fragment shader will be run. For
* instance, if sampleShading is 0.5 in MSAA16 mode, the fragment shader will run a minimum of
@@ -40,36 +35,12 @@ public:
protected:
void setWillUseGeoShader() { fWillUseGeoShader = true; }
-
- /**
- * If a GrFragmentProcessor in the GrPipeline needs localCoods, we will provide them in one of
- * three ways
- * 1) LocalCoordTransform * Position - in Shader
- * 2) LocalCoordTransform * ExplicitLocalCoords- in Shader
- * 3) A transformation on the CPU uploaded via vertex attribute
- */
- enum LocalCoordsType {
- kUnused_LocalCoordsType,
- kHasExplicit_LocalCoordsType,
- kHasTransformed_LocalCoordsType
- };
-
- void setHasExplicitLocalCoords() {
- SkASSERT(kUnused_LocalCoordsType == fLocalCoordsType);
- fLocalCoordsType = kHasExplicit_LocalCoordsType;
- }
- void setHasTransformedLocalCoords() {
- SkASSERT(kUnused_LocalCoordsType == fLocalCoordsType);
- fLocalCoordsType = kHasTransformed_LocalCoordsType;
- }
-
void setSampleShading(float sampleShading) {
fSampleShading = sampleShading;
}
private:
bool fWillUseGeoShader;
- LocalCoordsType fLocalCoordsType;
float fSampleShading;
typedef GrPrimitiveProcessor INHERITED;