move program descriptor generation to flush
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/829e1b80b1020b17f2078020c990e079b70c077c
Review URL: https://codereview.chromium.org/777673003
diff --git a/src/gpu/GrProgramDesc.h b/src/gpu/GrProgramDesc.h
index 655254f..ef7be23 100644
--- a/src/gpu/GrProgramDesc.h
+++ b/src/gpu/GrProgramDesc.h
@@ -103,8 +103,6 @@
// effects that read the fragment position.
// Otherwise, 0.
- SkBool8 fEmitsPointSize;
-
ColorInput fColorInput : 8;
ColorInput fCoverageInput : 8;
@@ -136,6 +134,19 @@
// A struct to communicate descriptor information to the program descriptor builder
struct DescInfo {
+ bool operator==(const DescInfo& that) const {
+ return fHasVertexColor == that.fHasVertexColor &&
+ fHasVertexCoverage == that.fHasVertexCoverage &&
+ fInputColorIsUsed == that.fInputColorIsUsed &&
+ fInputCoverageIsUsed == that.fInputCoverageIsUsed &&
+ fReadsDst == that.fReadsDst &&
+ fReadsFragPosition == that.fReadsFragPosition &&
+ fRequiresLocalCoordAttrib == that.fRequiresLocalCoordAttrib &&
+ fPrimaryOutputType == that.fPrimaryOutputType &&
+ fSecondaryOutputType == that.fSecondaryOutputType;
+
+ }
+ bool operator!=(const DescInfo& that) const { return !(*this == that); };
// TODO when GPs control uniform / attribute handling of color / coverage, then we can
// clean this up
bool fHasVertexColor;