Default geometry processor

BUG=skia:

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

Review URL: https://codereview.chromium.org/678953002
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp
index 529e9ed..a9d8ec4 100644
--- a/src/gpu/GrOptDrawState.cpp
+++ b/src/gpu/GrOptDrawState.cpp
@@ -7,9 +7,10 @@
 
 #include "GrOptDrawState.h"
 
+#include "GrDefaultGeoProcFactory.h"
 #include "GrDrawState.h"
 #include "GrDrawTargetCaps.h"
-#include "gl/GrGpuGL.h"
+#include "GrGpu.h"
 
 GrOptDrawState::GrOptDrawState(const GrDrawState& drawState,
                                BlendOptFlags blendOptFlags,
@@ -63,6 +64,10 @@
     // Copy GeometryProcesssor from DS or ODS
     if (drawState.hasGeometryProcessor()) {
         fGeometryProcessor.initAndRef(drawState.fGeometryProcessor);
+    } else if (!GrGpu::IsPathRenderingDrawType(drawType)) {
+        // Install default GP, this will be ignored if we are rendering with fragment shader only
+        // TODO(joshualitt) rendering code should do this
+        fGeometryProcessor.reset(GrDefaultGeoProcFactory::Create());
     } else {
         fGeometryProcessor.reset(NULL);
     }