Tighten up creation of the GrProgramDesc and remove some unnecessary checks

This takes care of some of the deferred work from:

https://skia-review.googlesource.com/c/skia/+/244118 (Add GrProgramInfo to centralize management of program information)

Bug: skia:9455
Change-Id: If1cdfc0a0614babd18f7f4bccd445e03a6dbb9ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/247301
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrProgramDesc.cpp b/src/gpu/GrProgramDesc.cpp
index ac7b8b9..c416e23 100644
--- a/src/gpu/GrProgramDesc.cpp
+++ b/src/gpu/GrProgramDesc.cpp
@@ -259,6 +259,10 @@
                                          programInfo.pipeline().numCoverageFragmentProcessors()) {
         return false;
     }
+    // If we knew the shader won't depend on origin, we could skip this (and use the same program
+    // for both origins). Instrumenting all fragment processors would be difficult and error prone.
+    header->fSurfaceOriginKey =
+        GrGLSLFragmentShaderBuilder::KeyForSurfaceOrigin(programInfo.origin());
     header->fProcessorFeatures = (uint8_t)processorFeatures;
     SkASSERT(header->processorFeatures() == processorFeatures);  // Ensure enough bits.
     header->fSnapVerticesToPixelCenters = programInfo.pipeline().snapVerticesToPixelCenters();