Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: include/gpu/GrProcessorStage.h

Issue 637003003: Opt state takes a GP instead of a GeometryStage (Closed) Base URL: https://skia.googlesource.com/skia.git@builder_cleanup
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: include/gpu/GrProcessorStage.h
diff --git a/include/gpu/GrProcessorStage.h b/include/gpu/GrProcessorStage.h
index 5cc06e78db3c298568535bb1aaf4ee523bf564ba..192c7753bc5890da132391626eb87f6f9b9f307a 100644
--- a/include/gpu/GrProcessorStage.h
+++ b/include/gpu/GrProcessorStage.h
@@ -24,16 +24,16 @@
// is immutable, and only owns pending execution refs. This requries removing the common base
// class from GrDrawState and GrOptDrawState called GrRODrawState and converting to GrOptDrawState
// when draws are enqueued in the GrInOrderDrawBuffer.
-class GrProcessorStage {
+class GrFragmentStage {
public:
- explicit GrProcessorStage(const GrProcessor* proc)
+ explicit GrFragmentStage(const GrFragmentProcessor* proc)
: fProc(SkRef(proc)) {
fCoordChangeMatrixSet = false;
}
- virtual ~GrProcessorStage() {}
+ virtual ~GrFragmentStage() {}
bsalomon 2014/10/09 18:35:45 delete virtual?
- GrProcessorStage(const GrProcessorStage& other) {
+ GrFragmentStage(const GrFragmentStage& other) {
fCoordChangeMatrixSet = other.fCoordChangeMatrixSet;
if (other.fCoordChangeMatrixSet) {
fCoordChangeMatrix = other.fCoordChangeMatrix;
@@ -41,7 +41,7 @@ public:
fProc.initAndRef(other.fProc);
}
- static bool AreCompatible(const GrProcessorStage& a, const GrProcessorStage& b,
+ static bool AreCompatible(const GrFragmentStage& a, const GrFragmentStage& b,
bool usingExplicitLocalCoords) {
SkASSERT(a.fProc.get());
SkASSERT(b.fProc.get());
@@ -90,7 +90,7 @@ public:
SkMatrix fCoordChangeMatrix;
SkDEBUGCODE(mutable uint32_t fEffectUniqueID;)
- friend class GrProcessorStage;
+ friend class GrFragmentStage;
};
/**
@@ -149,38 +149,14 @@ public:
}
}
- virtual const GrProcessor* getProcessor() const = 0;
+ virtual const GrFragmentProcessor* getProcessor() const { return fProc.get(); }
bsalomon 2014/10/09 18:35:45 delete virtual?
void convertToPendingExec() { fProc.convertToPendingExec(); }
protected:
- bool fCoordChangeMatrixSet;
- SkMatrix fCoordChangeMatrix;
- GrProgramElementRef<const GrProcessor> fProc;
-};
-
-class GrFragmentStage : public GrProcessorStage {
-public:
- GrFragmentStage(const GrFragmentProcessor* fp) : GrProcessorStage(fp) {}
-
- virtual const GrFragmentProcessor* getProcessor() const {
- return static_cast<const GrFragmentProcessor*>(fProc.get());
- }
-
- typedef GrFragmentProcessor Processor;
- typedef GrGLFragmentProcessor GLProcessor;
-};
-
-class GrGeometryStage : public GrProcessorStage {
-public:
- GrGeometryStage(const GrGeometryProcessor* gp) : GrProcessorStage(gp) {}
-
- virtual const GrGeometryProcessor* getProcessor() const {
- return static_cast<const GrGeometryProcessor*>(fProc.get());
- }
-
- typedef GrGeometryProcessor Processor;
- typedef GrGLGeometryProcessor GLProcessor;
+ bool fCoordChangeMatrixSet;
+ SkMatrix fCoordChangeMatrix;
+ GrProgramElementRef<const GrFragmentProcessor> fProc;
};
#endif

Powered by Google App Engine
This is Rietveld 408576698