diff options
author | joshualitt <joshualitt@chromium.org> | 2015-07-14 11:02:45 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-14 11:02:46 -0700 |
commit | 3df1e2163f9d7afc997dc14c440fab31277bff5c (patch) | |
tree | b75637ba66e89f6ea9bb6ec44f58502a55bab830 /src | |
parent | ab51cbd9b6b98b9e6721863694cc447ad403cd18 (diff) |
Another trivial cleanup
TBR=bsalomon@google.com
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/52e7657cd850f95e66eb23c6d138ee45149a1039
Review URL: https://codereview.chromium.org/1229303003
Diffstat (limited to 'src')
-rw-r--r-- | src/effects/gradients/SkGradientShaderPriv.h | 1 | ||||
-rw-r--r-- | src/gpu/GrPendingFragmentStage.h | 46 | ||||
-rw-r--r-- | src/gpu/GrPipelineBuilder.h | 2 | ||||
-rw-r--r-- | src/gpu/GrProcOptInfo.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrProcOptInfo.h | 2 | ||||
-rw-r--r-- | src/gpu/effects/GrConfigConversionEffect.h | 1 |
6 files changed, 12 insertions, 42 deletions
diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h index 9dc6b66930..cb882b2a6d 100644 --- a/src/effects/gradients/SkGradientShaderPriv.h +++ b/src/effects/gradients/SkGradientShaderPriv.h @@ -296,7 +296,6 @@ static inline int next_dither_toggle16(int toggle) { #include "GrFragmentProcessor.h" #include "gl/GrGLProcessor.h" -class GrFragmentStage; class GrInvariantOutput; /* diff --git a/src/gpu/GrPendingFragmentStage.h b/src/gpu/GrPendingFragmentStage.h index 0bf984ab7d..dfa5688663 100644 --- a/src/gpu/GrPendingFragmentStage.h +++ b/src/gpu/GrPendingFragmentStage.h @@ -5,49 +5,23 @@ * found in the LICENSE file. */ -#ifndef GrPendingProcessorStage_DEFINED -#define GrPendingProcessorStage_DEFINED +#ifndef GrPendingFragmentStage_DEFINED +#define GrPendingFragmentStage_DEFINED -#include "GrFragmentStage.h" -#include "GrCoordTransform.h" -#include "GrFragmentProcessor.h" +#include "GrStagedProcessor.h" #include "GrPendingProgramElement.h" /** - * This a baked variant of GrFragmentStage, as recorded in GrOptDrawState. + * This a baked variant of GrFragmentStage, as recorded in GrPipeline */ -class GrPendingFragmentStage { +class GrPendingFragmentStage : public GrStagedProcessor<GrPendingProgramElement> { public: - GrPendingFragmentStage(const GrFragmentStage& stage) : fProc(stage.processor()) {} - - GrPendingFragmentStage(const GrPendingFragmentStage& that) { *this = that; } - - GrPendingFragmentStage& operator=(const GrPendingFragmentStage& that) { - fProc.reset(that.fProc.get()); - return *this; - } - - bool operator==(const GrPendingFragmentStage& that) const { - return this->processor()->isEqual(*that.processor()); - } - - bool operator!=(const GrPendingFragmentStage& that) const { return !(*this == that); } - - /** - * For a coord transform on the fragment processor, does it or the coord change matrix (if - * relevant) contain perspective? - */ - bool isPerspectiveCoordTransform(int matrixIndex) const { - const GrCoordTransform& coordTransform = this->processor()->coordTransform(matrixIndex); - uint32_t type = coordTransform.getMatrix().getType(); - return SkToBool(SkMatrix::kPerspective_Mask & type); + GrPendingFragmentStage(const GrFragmentStage& stage) { + INHERITED::fProc.reset(stage.processor()); } - const char* name() const { return fProc->name(); } - - const GrFragmentProcessor* processor() const { return fProc.get(); } - -protected: - GrPendingProgramElement<const GrFragmentProcessor> fProc; +private: + typedef GrStagedProcessor<GrPendingProgramElement> INHERITED; }; + #endif diff --git a/src/gpu/GrPipelineBuilder.h b/src/gpu/GrPipelineBuilder.h index dd3db6e092..209845461d 100644 --- a/src/gpu/GrPipelineBuilder.h +++ b/src/gpu/GrPipelineBuilder.h @@ -12,7 +12,7 @@ #include "GrCaps.h" #include "GrClip.h" #include "GrGpuResourceRef.h" -#include "GrFragmentStage.h" +#include "GrStagedProcessor.h" #include "GrProcOptInfo.h" #include "GrProcessorDataManager.h" #include "GrRenderTarget.h" diff --git a/src/gpu/GrProcOptInfo.cpp b/src/gpu/GrProcOptInfo.cpp index dc499fa337..53f2e02451 100644 --- a/src/gpu/GrProcOptInfo.cpp +++ b/src/gpu/GrProcOptInfo.cpp @@ -8,8 +8,6 @@ #include "GrProcOptInfo.h" #include "GrBatch.h" -#include "GrFragmentProcessor.h" -#include "GrFragmentStage.h" #include "GrGeometryProcessor.h" void GrProcOptInfo::calcColorWithBatch(const GrBatch* batch, diff --git a/src/gpu/GrProcOptInfo.h b/src/gpu/GrProcOptInfo.h index f518172e22..0430916405 100644 --- a/src/gpu/GrProcOptInfo.h +++ b/src/gpu/GrProcOptInfo.h @@ -10,9 +10,9 @@ #include "GrColor.h" #include "GrInvariantOutput.h" +#include "GrStagedProcessor.h" class GrBatch; -class GrFragmentStage; class GrFragmentProcessor; class GrPrimitiveProcessor; class GrProcessor; diff --git a/src/gpu/effects/GrConfigConversionEffect.h b/src/gpu/effects/GrConfigConversionEffect.h index f00a284177..d87d009469 100644 --- a/src/gpu/effects/GrConfigConversionEffect.h +++ b/src/gpu/effects/GrConfigConversionEffect.h @@ -10,7 +10,6 @@ #include "GrSingleTextureEffect.h" -class GrFragmentStage; class GrInvariantOutput; /** |