aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPendingFragmentStage.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-07-14 11:02:45 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-14 11:02:46 -0700
commit3df1e2163f9d7afc997dc14c440fab31277bff5c (patch)
treeb75637ba66e89f6ea9bb6ec44f58502a55bab830 /src/gpu/GrPendingFragmentStage.h
parentab51cbd9b6b98b9e6721863694cc447ad403cd18 (diff)
Another trivial cleanup
Diffstat (limited to 'src/gpu/GrPendingFragmentStage.h')
-rw-r--r--src/gpu/GrPendingFragmentStage.h46
1 files changed, 10 insertions, 36 deletions
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