Cleanup legacy NVPR-related definitions

Fixed-function NVPR codepaths were removed a while ago. Only NVPR API
version 1.3 (PathFragmentInputGen) was left working. Remove
backwards-compatibility code that was left behind.

Remove some NVPR API function typedefs that were left from initial
commits.

Remove PathCoords function pointer from GrGLInterface, it has
never been called and causes problems in the future, since it will
not be implemented in the Chromium pseudo extension.

Avoid failing interface creation even if nvprmsaaXX config is
requested but the driver is not recent enough. The SAN bots have
old driver, but try to run nvprmsaa16 configs. Instead, print
out a warning.

Committed: https://skia.googlesource.com/skia/+/fb8d6884e0e01d0c2f8596adf5af1efb0d08de7e

Committed: https://skia.googlesource.com/skia/+/e35b5d99d8dfcc6b2be844df28cba47436380809

Review URL: https://codereview.chromium.org/1177243004
diff --git a/src/gpu/GrContextFactory.cpp b/src/gpu/GrContextFactory.cpp
index 7df1917..edef2f7 100755
--- a/src/gpu/GrContextFactory.cpp
+++ b/src/gpu/GrContextFactory.cpp
@@ -17,7 +17,8 @@
 #endif
 #include "gl/SkGLContext.h"
 #include "gl/SkNullGLContext.h"
-
+#include "gl/GrGLGpu.h"
+#include "GrCaps.h"
 
 GrContext* GrContextFactory::get(GLContextType type, GrGLStandard forcedGpuAPI) {
     for (int i = 0; i < fContexts.count(); ++i) {
@@ -60,13 +61,9 @@
 
     SkASSERT(glCtx->isValid());
 
-    // Ensure NVPR is available for the NVPR type and block it from other types.
+    // Block NVPR from non-NVPR types.
     SkAutoTUnref<const GrGLInterface> glInterface(SkRef(glCtx->gl()));
-    if (kNVPR_GLContextType == type) {
-        if (!glInterface->hasExtension("GL_NV_path_rendering")) {
-            return NULL;
-        }
-    } else {
+    if (kNVPR_GLContextType != type) {
         glInterface.reset(GrGLInterfaceRemoveNVPR(glInterface));
         if (!glInterface) {
             return NULL;
@@ -79,6 +76,18 @@
     if (!grCtx.get()) {
         return NULL;
     }
+    // Warn if path rendering support is not available for the NVPR type.
+    if (kNVPR_GLContextType == type) {
+        if (!grCtx->caps()->shaderCaps()->pathRenderingSupport()) {
+            GrGLGpu* gpu = static_cast<GrGLGpu*>(grCtx->getGpu());
+            const GrGLubyte* verUByte;
+            GR_GL_CALL_RET(gpu->glInterface(), verUByte, GetString(GR_GL_VERSION));
+            const char* ver = reinterpret_cast<const char*>(verUByte);
+            SkDebugf("\nWARNING: nvprmsaa config requested, but driver path rendering support not"
+                     " available. Maybe update the driver? Your driver version string: \"%s\"\n", ver);
+        }
+    }
+
     GPUContext& ctx = fContexts.push_back();
     ctx.fGLContext = glCtx.get();
     ctx.fGLContext->ref();