Attach GrOptDrawState into shader building pipeline
The OptDrawState is now used for creating the actual gl shader. Current
optimizations dones in GrOptDrawState include:
All blend optimizations
Constant color/coverage stage optimizations
BUG=skia:
R=bsalomon@google.com, joshualitt@google.com
Author: egdaniel@google.com
Review URL: https://codereview.chromium.org/504203004
diff --git a/src/gpu/gl/GrGLProgramDesc.h b/src/gpu/gl/GrGLProgramDesc.h
index b1f54b7..e91dbe0 100644
--- a/src/gpu/gl/GrGLProgramDesc.h
+++ b/src/gpu/gl/GrGLProgramDesc.h
@@ -55,15 +55,13 @@
int currAttribIndex);
/**
- * Builds a program descriptor from a GrDrawState. Whether the primitive type is points, the
- * output of GrDrawState::getBlendOpts, and the caps of the GrGpuGL are also inputs. It also
- * outputs the color and coverage stages referenced by the generated descriptor. This may
- * not contain all stages from the draw state and coverage stages from the drawState may
- * be treated as color stages in the output.
+ * Builds a program descriptor from a GrOptDrawState. Whether the primitive type is points, and
+ * the caps of the GrGpuGL are also inputs. It also outputs the color and coverage stages
+ * referenced by the generated descriptor. Coverage stages from the drawState may be treated as
+ * color stages in the output.
*/
- static bool Build(const GrDrawState&,
+ static bool Build(const GrOptDrawState&,
GrGpu::DrawType drawType,
- GrDrawState::BlendOptFlags,
GrBlendCoeff srcCoeff,
GrBlendCoeff dstCoeff,
const GrGpuGL* gpu,