Move strictES2Mode method to ProgramConfig.

This will help us migrate code out of IRGenerator.

Change-Id: Id9c70cc4577ed41b2fc5ad26f752caea13a56083
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372437
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLIRGenerator.h b/src/sksl/SkSLIRGenerator.h
index 0a9abe7..a4b47a0 100644
--- a/src/sksl/SkSLIRGenerator.h
+++ b/src/sksl/SkSLIRGenerator.h
@@ -280,8 +280,7 @@
     // Runtime effects (and the interpreter, which uses the same CPU runtime) require adherence to
     // the strict rules from The OpenGL ES Shading Language Version 1.00. (Including Appendix A).
     bool strictES2Mode() const {
-        return this->programKind() == ProgramKind::kRuntimeEffect ||
-               this->programKind() == ProgramKind::kGeneric;
+        return fContext.fConfig->strictES2Mode();
     }
 
     Program::Inputs fInputs;
diff --git a/src/sksl/SkSLProgramSettings.h b/src/sksl/SkSLProgramSettings.h
index ad98888..bc13775 100644
--- a/src/sksl/SkSLProgramSettings.h
+++ b/src/sksl/SkSLProgramSettings.h
@@ -79,6 +79,10 @@
 struct ProgramConfig {
     ProgramKind fKind;
     ProgramSettings fSettings;
+
+    bool strictES2Mode() const {
+        return fKind == ProgramKind::kRuntimeEffect || fKind == ProgramKind::kGeneric;
+    }
 };
 
 }  // namespace SkSL