Remove GrPipelineBuilder from getPathRenderer call

Logically this CL:

Moves the PathRendererChain from GrContext to GrDrawManager
   - this was needed to untangled the Path-Chain/Renderer header mess
   - this entailed adding getDrawingMgr so the CMM could access the PathRenderingChain
   - this also entailed re-adding freeGpuResources to the GrDrawingMgr
Moves the CanDrawArgs struct up stack
Removes the GrPipelineBuilder from the CanDrawArgs struct

Review URL: https://codereview.chromium.org/1407883004
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 04e1b8d..755b0f2 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -60,8 +60,6 @@
     fCaps = nullptr;
     fResourceCache = nullptr;
     fResourceProvider = nullptr;
-    fPathRendererChain = nullptr;
-    fSoftwarePathRenderer = nullptr;
     fBatchFontCache = nullptr;
     fFlushToReduceCacheSize = false;
 }
@@ -118,8 +116,6 @@
 
     fGpu->unref();
     fCaps->unref();
-    SkSafeUnref(fPathRendererChain);
-    SkSafeUnref(fSoftwarePathRenderer);
 }
 
 void GrContext::abandonContext() {
@@ -130,11 +126,6 @@
 
     fGpu->contextAbandoned();
 
-    // a path renderer may be holding onto resources that
-    // are now unusable
-    SkSafeSetNull(fPathRendererChain);
-    SkSafeSetNull(fSoftwarePathRenderer);
-
     fDrawingManager->abandon();
 
     fBatchFontCache->freeAll();
@@ -151,9 +142,8 @@
 
     fBatchFontCache->freeAll();
     fLayerCache->freeAll();
-    // a path renderer may be holding onto resources
-    SkSafeSetNull(fPathRendererChain);
-    SkSafeSetNull(fSoftwarePathRenderer);
+
+    fDrawingManager->freeGpuResources();
 
     fResourceCache->purgeAllUnlocked();
 }
@@ -535,42 +525,6 @@
     }
 }
 
-/*
- * This method finds a path renderer that can draw the specified path on
- * the provided target.
- * Due to its expense, the software path renderer has split out so it can
- * can be individually allowed/disallowed via the "allowSW" boolean.
- */
-GrPathRenderer* GrContext::getPathRenderer(const GrPipelineBuilder& pipelineBuilder,
-                                           const SkMatrix& viewMatrix,
-                                           const SkPath& path,
-                                           const GrStrokeInfo& stroke,
-                                           bool allowSW,
-                                           GrPathRendererChain::DrawType drawType,
-                                           GrPathRendererChain::StencilSupport* stencilSupport) {
-
-    if (!fPathRendererChain) {
-        fPathRendererChain = new GrPathRendererChain(this);
-    }
-
-    GrPathRenderer* pr = fPathRendererChain->getPathRenderer(this->caps()->shaderCaps(),
-                                                             pipelineBuilder,
-                                                             viewMatrix,
-                                                             path,
-                                                             stroke,
-                                                             drawType,
-                                                             stencilSupport);
-
-    if (!pr && allowSW) {
-        if (!fSoftwarePathRenderer) {
-            fSoftwarePathRenderer = new GrSoftwarePathRenderer(this);
-        }
-        pr = fSoftwarePathRenderer;
-    }
-
-    return pr;
-}
-
 ////////////////////////////////////////////////////////////////////////////////
 int GrContext::getRecommendedSampleCount(GrPixelConfig config,
                                          SkScalar dpi) const {