Add fields to fragmentProcessors in sksl code.

Getters for GrFragmentProcessor's optimization flags and state are
exposed as constant fields on the fragmentProcessor variable in sksl.
The CPP code generation then emits extra instructions to invoke the
particular getter when building the final sksl string at runtime.

Bug: skia:
Change-Id: If6bf4f4df6c446fb6331484d36effb1386172918
Reviewed-on: https://skia-review.googlesource.com/152381
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLCPPCodeGenerator.h b/src/sksl/SkSLCPPCodeGenerator.h
index 4b62fc6..08d88a9 100644
--- a/src/sksl/SkSLCPPCodeGenerator.h
+++ b/src/sksl/SkSLCPPCodeGenerator.h
@@ -43,6 +43,8 @@
 
     void writeSwizzle(const Swizzle& swizzle) override;
 
+    void writeFieldAccess(const FieldAccess& access) override;
+
     void writeVariableReference(const VariableReference& ref) override;
 
     String getSamplerHandle(const Variable& var);
@@ -113,6 +115,8 @@
     // Append CPP code to the current extra emit code block.
     void addExtraEmitCodeLine(const String& toAppend);
 
+    int getChildFPIndex(const VariableReference& reference) const;
+
     String fName;
     String fFullName;
     SectionAndParameterHelper fSectionAndParameterHelper;